wasmer/rustdoc/inkwell/builder/struct.Builder.html
2019-09-06 15:57:44 -07:00

418 lines
165 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Builder` struct in crate `inkwell`."><meta name="keywords" content="rust, rustlang, rust-lang, Builder"><title>inkwell::builder::Builder - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../inkwell/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Builder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.build_address_space_cast">build_address_space_cast</a><a href="#method.build_aggregate_return">build_aggregate_return</a><a href="#method.build_alloca">build_alloca</a><a href="#method.build_and">build_and</a><a href="#method.build_array_alloca">build_array_alloca</a><a href="#method.build_array_malloc">build_array_malloc</a><a href="#method.build_atomicrmw">build_atomicrmw</a><a href="#method.build_bitcast">build_bitcast</a><a href="#method.build_call">build_call</a><a href="#method.build_cast">build_cast</a><a href="#method.build_cmpxchg">build_cmpxchg</a><a href="#method.build_conditional_branch">build_conditional_branch</a><a href="#method.build_extract_element">build_extract_element</a><a href="#method.build_extract_value">build_extract_value</a><a href="#method.build_fence">build_fence</a><a href="#method.build_float_add">build_float_add</a><a href="#method.build_float_cast">build_float_cast</a><a href="#method.build_float_compare">build_float_compare</a><a href="#method.build_float_div">build_float_div</a><a href="#method.build_float_ext">build_float_ext</a><a href="#method.build_float_mul">build_float_mul</a><a href="#method.build_float_neg">build_float_neg</a><a href="#method.build_float_rem">build_float_rem</a><a href="#method.build_float_sub">build_float_sub</a><a href="#method.build_float_to_signed_int">build_float_to_signed_int</a><a href="#method.build_float_to_unsigned_int">build_float_to_unsigned_int</a><a href="#method.build_float_trunc">build_float_trunc</a><a href="#method.build_free">build_free</a><a href="#method.build_gep">build_gep</a><a href="#method.build_global_string">build_global_string</a><a href="#method.build_global_string_ptr">build_global_string_ptr</a><a href="#method.build_in_bounds_gep">build_in_bounds_gep</a><a href="#method.build_indirect_branch">build_indirect_branch</a><a href="#method.build_insert_element">build_insert_element</a><a href="#method.build_insert_value">build_insert_value</a><a href="#method.build_int_add">build_int_add</a><a href="#method.build_int_cast">build_int_cast</a><a href="#method.build_int_compare">build_int_compare</a><a href="#method.build_int_exact_signed_div">build_int_exact_signed_div</a><a href="#method.build_int_mul">build_int_mul</a><a href="#method.build_int_neg">build_int_neg</a><a href="#method.build_int_nsw_add">build_int_nsw_add</a><a href="#method.build_int_nsw_mul">build_int_nsw_mul</a><a href="#method.build_int_nsw_neg">build_int_nsw_neg</a><a href="#method.build_int_nsw_sub">build_int_nsw_sub</a><a href="#method.build_int_nuw_add">build_int_nuw_add</a><a href="#method.build_int_nuw_mul">build_int_nuw_mul</a><a href="#method.build_int_nuw_neg">build_int_nuw_neg</a><a href="#method.build_int_nuw_sub">build_int_nuw_sub</a><a href="#method.build_int_s_extend">build_int_s_extend</a><a href="#method.build_int_s_extend_or_bit_cast">build_int_s_extend_or_bit_cast</a><a href="#method.build_int_signed_div">build_int_signed_div</a><a href="#method.build_int_signed_rem">build_int_signed_rem</a><a href="#method.build_int_sub">build_int_sub</a><a href="#method.build_int_to_ptr">build_int_to_ptr</a><a href="#method.build_int_truncate">build_int_truncate</a><a href="#method.build_int_truncate_or_bit_cast">build_int_truncate_or_bit_cast</a><a href="#method.build_int_unsigned_div">build_int_unsigned_div</a><a href="#method.build_int_unsigned_rem">build_int_unsigned_rem</a><a href="#method.build_int_z_extend">build_int_z_extend</a><a href="#method.build_int_z_extend_or_bit_cast">build_int_z_extend_or_bit_cast</a><a href="#method.build_is_not_null">build_is_not_null</a><a href="#method.build_is_null">build_is_null</a><a href="#method.build_left_shift">build_left_shift</a><a href="#method.build_load">build_load</a><a href="#method.build_malloc">build_malloc</a><a href="#method.build_not">build_not</a><a href="#method.build_or">build_or</a><a href="#method.build_phi">build_phi</a><a href="#method.build_pointer_cast">build_pointer_cast</a><a href="#method.build_ptr_diff">build_ptr_diff</a><a href="#method.build_ptr_to_int">build_ptr_to_int</a><a href="#method.build_return">build_return</a><a href="#method.build_right_shift">build_right_shift</a><a href="#method.build_select">build_select</a><a href="#method.build_shuffle_vector">build_shuffle_vector</a><a href="#method.build_signed_int_to_float">build_signed_int_to_float</a><a href="#method.build_store">build_store</a><a href="#method.build_struct_gep">build_struct_gep</a><a href="#method.build_switch">build_switch</a><a href="#method.build_unconditional_branch">build_unconditional_branch</a><a href="#method.build_unreachable">build_unreachable</a><a href="#method.build_unsigned_int_to_float">build_unsigned_int_to_float</a><a href="#method.build_va_arg">build_va_arg</a><a href="#method.build_xor">build_xor</a><a href="#method.clear_insertion_position">clear_insertion_position</a><a href="#method.create">create</a><a href="#method.get_insert_block">get_insert_block</a><a href="#method.insert_instruction">insert_instruction</a><a href="#method.position_at">position_at</a><a href="#method.position_at_end">position_at_end</a><a href="#method.position_before">position_before</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Drop">Drop</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class='location'><a href='../index.html'>inkwell</a>::<wbr><a href='index.html'>builder</a></p><script>window.sidebarCurrent = {name: 'Builder', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/inkwell/builder.rs.html#18-20' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>inkwell</a>::<wbr><a href='index.html'>builder</a>::<wbr><a class="struct" href=''>Builder</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct Builder { /* fields omitted */ }</pre></div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../inkwell/builder/struct.Builder.html" title="struct inkwell::builder::Builder">Builder</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/inkwell/builder.rs.html#22-1567' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.create' class="method"><code id='create.v'>pub fn <a href='#method.create' class='fnname'>create</a>() -&gt; Self</code><a class='srclink' href='../../src/inkwell/builder.rs.html#40-46' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a <code>Builder</code> belonging to the global <code>Context</code>.</p>
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">builder</span>::<span class="ident">Builder</span>;
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">Builder</span>::<span class="ident">create</span>();</pre></div>
</div><h4 id='method.build_return' class="method"><code id='build_return.v'>pub fn <a href='#method.build_return' class='fnname'>build_return</a>(&amp;self, value: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;dyn <a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>&gt;) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#72-78' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a function return instruction. It should be provided with <code>None</code> if the return type
is void otherwise <code>Some(&amp;value)</code> should be provided.</p>
<h1 id="example-1" class="section-header"><a href="#example-1">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="comment">// A simple function which returns its argument:</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;ret&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">arg_types</span> <span class="op">=</span> [<span class="ident">i32_type</span>.<span class="ident">into</span>()];
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span><span class="ident">arg_types</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;ret&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">i32_arg</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">i32_arg</span>));</pre></div>
</div><h4 id='method.build_aggregate_return' class="method"><code id='build_aggregate_return.v'>pub fn <a href='#method.build_aggregate_return' class='fnname'>build_aggregate_return</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;values: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#103-112' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a function return instruction for a return type which is an aggregate type (ie structs and arrays).
It is not necessary to use this over <code>build_return</code> but may be more convenient to use.</p>
<h1 id="example-2" class="section-header"><a href="#example-2">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="comment">// This builds a simple function which returns a struct (tuple) of two ints.</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;ret&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">i32_three</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">3</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">i32_seven</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">7</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">struct_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">struct_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_type</span>.<span class="ident">into</span>(), <span class="ident">i32_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">struct_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;ret&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="ident">builder</span>.<span class="ident">build_aggregate_return</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_three</span>.<span class="ident">into</span>(), <span class="ident">i32_seven</span>.<span class="ident">into</span>()]);</pre></div>
</div><h4 id='method.build_call' class="method"><code id='build_call.v'>pub fn <a href='#method.build_call' class='fnname'>build_call</a>&lt;F&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;function: F, <br>&nbsp;&nbsp;&nbsp;&nbsp;args: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.CallSiteValue.html" title="struct inkwell::values::CallSiteValue">CallSiteValue</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="enum" href="../../either/enum.Either.html" title="enum either::Either">Either</a>&lt;<a class="struct" href="../../inkwell/values/struct.FunctionValue.html" title="struct inkwell::values::FunctionValue">FunctionValue</a>, <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>&gt;&gt;,&nbsp;</span></code><a class='srclink' href='../../src/inkwell/builder.rs.html#142-181' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a function call instruction. It can take either a <code>FunctionValue</code> or a <code>PointerValue</code>
which is a function pointer. It will panic if the <code>PointerValue</code> is not a function pointer.
This may be turned into a Result in the future, however.</p>
<h1 id="example-3" class="section-header"><a href="#example-3">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="comment">// A simple function which calls itself:</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;ret&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;ret&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">i32_arg</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="kw">let</span> <span class="ident">ret_val</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_call</span>(<span class="ident">fn_value</span>, <span class="kw-2">&amp;</span>[<span class="ident">i32_arg</span>], <span class="string">&quot;call&quot;</span>)
.<span class="ident">try_as_basic_value</span>()
.<span class="ident">left</span>()
.<span class="ident">unwrap</span>();
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">ret_val</span>));</pre></div>
</div><h4 id='method.build_gep' class="method"><code id='build_gep.v'>pub unsafe fn <a href='#method.build_gep' class='fnname'>build_gep</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ordered_indexes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#185-194' title='goto source code'>[src]</a></h4><div class='docblock'><p>GEP is very likely to segfault if indexes are used incorrectly, and is therefore an unsafe function. Maybe we can change this in the future.</p>
</div><h4 id='method.build_in_bounds_gep' class="method"><code id='build_in_bounds_gep.v'>pub unsafe fn <a href='#method.build_in_bounds_gep' class='fnname'>build_in_bounds_gep</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ordered_indexes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#199-208' title='goto source code'>[src]</a></h4><div class='docblock'><p>GEP is very likely to segfault if indexes are used incorrectly, and is therefore an unsafe function. Maybe we can change this in the future.</p>
</div><h4 id='method.build_struct_gep' class="method"><code id='build_struct_gep.v'>pub unsafe fn <a href='#method.build_struct_gep' class='fnname'>build_struct_gep</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#214-220' title='goto source code'>[src]</a></h4><div class='docblock'><p>GEP is very likely to segfault if indexes are used incorrectly, and is therefore an unsafe function. Maybe we can change this in the future.</p>
</div><h4 id='method.build_ptr_diff' class="method"><code id='build_ptr_diff.v'>pub fn <a href='#method.build_ptr_diff' class='fnname'>build_ptr_diff</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs_ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs_ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#247-255' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds an instruction which calculates the difference of two pointers.</p>
<h1 id="example-4" class="section-header"><a href="#example-4">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">AddressSpace</span>;
<span class="comment">// Builds a function which diffs two pointers</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;ret&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">void_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">void_type</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">i32_ptr_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">ptr_type</span>(<span class="ident">AddressSpace</span>::<span class="ident">Generic</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">void_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_ptr_type</span>.<span class="ident">into</span>(), <span class="ident">i32_ptr_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;ret&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">i32_ptr_param1</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_pointer_value</span>();
<span class="kw">let</span> <span class="ident">i32_ptr_param2</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_nth_param</span>(<span class="number">1</span>).<span class="ident">unwrap</span>().<span class="ident">into_pointer_value</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="ident">builder</span>.<span class="ident">build_ptr_diff</span>(<span class="ident">i32_ptr_param1</span>, <span class="ident">i32_ptr_param2</span>, <span class="string">&quot;diff&quot;</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">None</span>);</pre></div>
</div><h4 id='method.build_phi' class="method"><code id='build_phi.v'>pub fn <a href='#method.build_phi' class='fnname'>build_phi</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/types/trait.BasicType.html" title="trait inkwell::types::BasicType">BasicType</a>&gt;(&amp;self, type_: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../../inkwell/values/struct.PhiValue.html" title="struct inkwell::values::PhiValue">PhiValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#262-270' title='goto source code'>[src]</a></h4><h4 id='method.build_store' class="method"><code id='build_store.v'>pub fn <a href='#method.build_store' class='fnname'>build_store</a>&lt;V:&nbsp;<a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;value: V<br>) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#297-303' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a store instruction. It allows you to store a value of type <code>T</code> in a pointer to a type <code>T</code>.</p>
<h1 id="example-5" class="section-header"><a href="#example-5">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">AddressSpace</span>;
<span class="comment">// Builds a function which takes an i32 pointer and stores a 7 in it.</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;ret&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">void_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">void_type</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">i32_ptr_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">ptr_type</span>(<span class="ident">AddressSpace</span>::<span class="ident">Generic</span>);
<span class="kw">let</span> <span class="ident">i32_seven</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">7</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">void_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_ptr_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;ret&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">i32_ptr_param</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_pointer_value</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="ident">builder</span>.<span class="ident">build_store</span>(<span class="ident">i32_ptr_param</span>, <span class="ident">i32_seven</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">None</span>);</pre></div>
</div><h4 id='method.build_load' class="method"><code id='build_load.v'>pub fn <a href='#method.build_load' class='fnname'>build_load</a>(&amp;self, ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#330-338' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a load instruction. It allows you to retrieve a value of type <code>T</code> from a pointer to a type <code>T</code>.</p>
<h1 id="example-6" class="section-header"><a href="#example-6">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">AddressSpace</span>;
<span class="comment">// Builds a function which takes an i32 pointer and returns the pointed at i32.</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;ret&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">i32_ptr_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">ptr_type</span>(<span class="ident">AddressSpace</span>::<span class="ident">Generic</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_ptr_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;ret&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">i32_ptr_param</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_pointer_value</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="kw">let</span> <span class="ident">pointee</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_load</span>(<span class="ident">i32_ptr_param</span>, <span class="string">&quot;load&quot;</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">pointee</span>));</pre></div>
</div><h4 id='method.build_alloca' class="method"><code id='build_alloca.v'>pub fn <a href='#method.build_alloca' class='fnname'>build_alloca</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/types/trait.BasicType.html" title="trait inkwell::types::BasicType">BasicType</a>&gt;(&amp;self, ty: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#341-349' title='goto source code'>[src]</a></h4><h4 id='method.build_array_alloca' class="method"><code id='build_array_alloca.v'>pub fn <a href='#method.build_array_alloca' class='fnname'>build_array_alloca</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/types/trait.BasicType.html" title="trait inkwell::types::BasicType">BasicType</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ty: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;size: <a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#352-360' title='goto source code'>[src]</a></h4><h4 id='method.build_malloc' class="method"><code id='build_malloc.v'>pub fn <a href='#method.build_malloc' class='fnname'>build_malloc</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/types/trait.BasicType.html" title="trait inkwell::types::BasicType">BasicType</a>&gt;(&amp;self, ty: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#363-371' title='goto source code'>[src]</a></h4><h4 id='method.build_array_malloc' class="method"><code id='build_array_malloc.v'>pub fn <a href='#method.build_array_malloc' class='fnname'>build_array_malloc</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/types/trait.BasicType.html" title="trait inkwell::types::BasicType">BasicType</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ty: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;size: <a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#374-382' title='goto source code'>[src]</a></h4><h4 id='method.build_free' class="method"><code id='build_free.v'>pub fn <a href='#method.build_free' class='fnname'>build_free</a>(&amp;self, ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#385-391' title='goto source code'>[src]</a></h4><h4 id='method.insert_instruction' class="method"><code id='insert_instruction.v'>pub fn <a href='#method.insert_instruction' class='fnname'>insert_instruction</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;instruction: &amp;<a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;<br>)</code><a class='srclink' href='../../src/inkwell/builder.rs.html#393-406' title='goto source code'>[src]</a></h4><h4 id='method.get_insert_block' class="method"><code id='get_insert_block.v'>pub fn <a href='#method.get_insert_block' class='fnname'>get_insert_block</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a>&gt;</code><a class='srclink' href='../../src/inkwell/builder.rs.html#408-414' title='goto source code'>[src]</a></h4><h4 id='method.build_int_unsigned_div' class="method"><code id='build_int_unsigned_div.v'>pub fn <a href='#method.build_int_unsigned_div' class='fnname'>build_int_unsigned_div</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#419-427' title='goto source code'>[src]</a></h4><h4 id='method.build_int_signed_div' class="method"><code id='build_int_signed_div.v'>pub fn <a href='#method.build_int_signed_div' class='fnname'>build_int_signed_div</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#431-439' title='goto source code'>[src]</a></h4><h4 id='method.build_int_exact_signed_div' class="method"><code id='build_int_exact_signed_div.v'>pub fn <a href='#method.build_int_exact_signed_div' class='fnname'>build_int_exact_signed_div</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#443-451' title='goto source code'>[src]</a></h4><h4 id='method.build_int_unsigned_rem' class="method"><code id='build_int_unsigned_rem.v'>pub fn <a href='#method.build_int_unsigned_rem' class='fnname'>build_int_unsigned_rem</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#455-463' title='goto source code'>[src]</a></h4><h4 id='method.build_int_signed_rem' class="method"><code id='build_int_signed_rem.v'>pub fn <a href='#method.build_int_signed_rem' class='fnname'>build_int_signed_rem</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#468-476' title='goto source code'>[src]</a></h4><h4 id='method.build_int_s_extend' class="method"><code id='build_int_s_extend.v'>pub fn <a href='#method.build_int_s_extend' class='fnname'>build_int_s_extend</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_value: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#478-486' title='goto source code'>[src]</a></h4><h4 id='method.build_address_space_cast' class="method"><code id='build_address_space_cast.v'>pub fn <a href='#method.build_address_space_cast' class='fnname'>build_address_space_cast</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr_val: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr_type: <a class="struct" href="../../inkwell/types/struct.PointerType.html" title="struct inkwell::types::PointerType">PointerType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#489-497' title='goto source code'>[src]</a></h4><h4 id='method.build_bitcast' class="method"><code id='build_bitcast.v'>pub fn <a href='#method.build_bitcast' class='fnname'>build_bitcast</a>&lt;T, V&gt;(&amp;self, val: V, ty: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../inkwell/types/trait.BasicType.html" title="trait inkwell::types::BasicType">BasicType</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>,&nbsp;</span></code><a class='srclink' href='../../src/inkwell/builder.rs.html#526-538' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a bitcast instruction. A bitcast reinterprets the bits of one value
into a value of another type which has the same bit width.</p>
<h1 id="example-7" class="section-header"><a href="#example-7">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;bc&quot;</span>);
<span class="kw">let</span> <span class="ident">void_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">void_type</span>();
<span class="kw">let</span> <span class="ident">f32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">f32_type</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">arg_types</span> <span class="op">=</span> [<span class="ident">i32_type</span>.<span class="ident">into</span>()];
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">void_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span><span class="ident">arg_types</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;bc&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">i32_arg</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="ident">builder</span>.<span class="ident">build_bitcast</span>(<span class="ident">i32_arg</span>, <span class="ident">f32_type</span>, <span class="string">&quot;i32tof32&quot;</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">None</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">module</span>.<span class="ident">verify</span>().<span class="ident">is_ok</span>());</pre></div>
</div><h4 id='method.build_int_s_extend_or_bit_cast' class="method"><code id='build_int_s_extend_or_bit_cast.v'>pub fn <a href='#method.build_int_s_extend_or_bit_cast' class='fnname'>build_int_s_extend_or_bit_cast</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_value: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#540-548' title='goto source code'>[src]</a></h4><h4 id='method.build_int_z_extend' class="method"><code id='build_int_z_extend.v'>pub fn <a href='#method.build_int_z_extend' class='fnname'>build_int_z_extend</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_value: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#550-558' title='goto source code'>[src]</a></h4><h4 id='method.build_int_z_extend_or_bit_cast' class="method"><code id='build_int_z_extend_or_bit_cast.v'>pub fn <a href='#method.build_int_z_extend_or_bit_cast' class='fnname'>build_int_z_extend_or_bit_cast</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_value: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#560-568' title='goto source code'>[src]</a></h4><h4 id='method.build_int_truncate' class="method"><code id='build_int_truncate.v'>pub fn <a href='#method.build_int_truncate' class='fnname'>build_int_truncate</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_value: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#570-578' title='goto source code'>[src]</a></h4><h4 id='method.build_int_truncate_or_bit_cast' class="method"><code id='build_int_truncate_or_bit_cast.v'>pub fn <a href='#method.build_int_truncate_or_bit_cast' class='fnname'>build_int_truncate_or_bit_cast</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_value: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#580-588' title='goto source code'>[src]</a></h4><h4 id='method.build_float_rem' class="method"><code id='build_float_rem.v'>pub fn <a href='#method.build_float_rem' class='fnname'>build_float_rem</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#590-598' title='goto source code'>[src]</a></h4><h4 id='method.build_float_to_unsigned_int' class="method"><code id='build_float_to_unsigned_int.v'>pub fn <a href='#method.build_float_to_unsigned_int' class='fnname'>build_float_to_unsigned_int</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;float: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: &lt;T::<a class="type" href="../../inkwell/values/trait.FloatMathValue.html#associatedtype.BaseType" title="type inkwell::values::FloatMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.FloatMathType.html" title="trait inkwell::types::FloatMathType">FloatMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.FloatMathType.html#associatedtype.MathConvType" title="type inkwell::types::FloatMathType::MathConvType">MathConvType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.FloatMathValue.html#associatedtype.BaseType" title="type inkwell::values::FloatMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.FloatMathType.html" title="trait inkwell::types::FloatMathType">FloatMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.FloatMathType.html#associatedtype.MathConvType" title="type inkwell::types::FloatMathType::MathConvType">MathConvType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.ValueType" title="type inkwell::types::IntMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#601-609' title='goto source code'>[src]</a></h4><h4 id='method.build_float_to_signed_int' class="method"><code id='build_float_to_signed_int.v'>pub fn <a href='#method.build_float_to_signed_int' class='fnname'>build_float_to_signed_int</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;float: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: &lt;T::<a class="type" href="../../inkwell/values/trait.FloatMathValue.html#associatedtype.BaseType" title="type inkwell::values::FloatMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.FloatMathType.html" title="trait inkwell::types::FloatMathType">FloatMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.FloatMathType.html#associatedtype.MathConvType" title="type inkwell::types::FloatMathType::MathConvType">MathConvType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.FloatMathValue.html#associatedtype.BaseType" title="type inkwell::values::FloatMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.FloatMathType.html" title="trait inkwell::types::FloatMathType">FloatMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.FloatMathType.html#associatedtype.MathConvType" title="type inkwell::types::FloatMathType::MathConvType">MathConvType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.ValueType" title="type inkwell::types::IntMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#611-619' title='goto source code'>[src]</a></h4><h4 id='method.build_unsigned_int_to_float' class="method"><code id='build_unsigned_int_to_float.v'>pub fn <a href='#method.build_unsigned_int_to_float' class='fnname'>build_unsigned_int_to_float</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;float_type: &lt;T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.MathConvType" title="type inkwell::types::IntMathType::MathConvType">MathConvType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.MathConvType" title="type inkwell::types::IntMathType::MathConvType">MathConvType</a> as <a class="trait" href="../../inkwell/types/trait.FloatMathType.html" title="trait inkwell::types::FloatMathType">FloatMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.FloatMathType.html#associatedtype.ValueType" title="type inkwell::types::FloatMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#622-630' title='goto source code'>[src]</a></h4><h4 id='method.build_signed_int_to_float' class="method"><code id='build_signed_int_to_float.v'>pub fn <a href='#method.build_signed_int_to_float' class='fnname'>build_signed_int_to_float</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;float_type: &lt;T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.MathConvType" title="type inkwell::types::IntMathType::MathConvType">MathConvType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.MathConvType" title="type inkwell::types::IntMathType::MathConvType">MathConvType</a> as <a class="trait" href="../../inkwell/types/trait.FloatMathType.html" title="trait inkwell::types::FloatMathType">FloatMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.FloatMathType.html#associatedtype.ValueType" title="type inkwell::types::FloatMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#632-640' title='goto source code'>[src]</a></h4><h4 id='method.build_float_trunc' class="method"><code id='build_float_trunc.v'>pub fn <a href='#method.build_float_trunc' class='fnname'>build_float_trunc</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;float: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;float_type: T::<a class="type" href="../../inkwell/values/trait.FloatMathValue.html#associatedtype.BaseType" title="type inkwell::values::FloatMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#642-650' title='goto source code'>[src]</a></h4><h4 id='method.build_float_ext' class="method"><code id='build_float_ext.v'>pub fn <a href='#method.build_float_ext' class='fnname'>build_float_ext</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;float: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;float_type: T::<a class="type" href="../../inkwell/values/trait.FloatMathValue.html#associatedtype.BaseType" title="type inkwell::values::FloatMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#652-660' title='goto source code'>[src]</a></h4><h4 id='method.build_float_cast' class="method"><code id='build_float_cast.v'>pub fn <a href='#method.build_float_cast' class='fnname'>build_float_cast</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;float: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;float_type: T::<a class="type" href="../../inkwell/values/trait.FloatMathValue.html#associatedtype.BaseType" title="type inkwell::values::FloatMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#662-670' title='goto source code'>[src]</a></h4><h4 id='method.build_int_cast' class="method"><code id='build_int_cast.v'>pub fn <a href='#method.build_int_cast' class='fnname'>build_int_cast</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#673-681' title='goto source code'>[src]</a></h4><h4 id='method.build_float_div' class="method"><code id='build_float_div.v'>pub fn <a href='#method.build_float_div' class='fnname'>build_float_div</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#683-691' title='goto source code'>[src]</a></h4><h4 id='method.build_int_add' class="method"><code id='build_int_add.v'>pub fn <a href='#method.build_int_add' class='fnname'>build_int_add</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, lhs: T, rhs: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#694-702' title='goto source code'>[src]</a></h4><h4 id='method.build_int_nsw_add' class="method"><code id='build_int_nsw_add.v'>pub fn <a href='#method.build_int_nsw_add' class='fnname'>build_int_nsw_add</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#706-714' title='goto source code'>[src]</a></h4><h4 id='method.build_int_nuw_add' class="method"><code id='build_int_nuw_add.v'>pub fn <a href='#method.build_int_nuw_add' class='fnname'>build_int_nuw_add</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#718-726' title='goto source code'>[src]</a></h4><h4 id='method.build_float_add' class="method"><code id='build_float_add.v'>pub fn <a href='#method.build_float_add' class='fnname'>build_float_add</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#729-737' title='goto source code'>[src]</a></h4><h4 id='method.build_xor' class="method"><code id='build_xor.v'>pub fn <a href='#method.build_xor' class='fnname'>build_xor</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, lhs: T, rhs: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#740-748' title='goto source code'>[src]</a></h4><h4 id='method.build_and' class="method"><code id='build_and.v'>pub fn <a href='#method.build_and' class='fnname'>build_and</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, lhs: T, rhs: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#751-759' title='goto source code'>[src]</a></h4><h4 id='method.build_or' class="method"><code id='build_or.v'>pub fn <a href='#method.build_or' class='fnname'>build_or</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, lhs: T, rhs: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#762-770' title='goto source code'>[src]</a></h4><h4 id='method.build_left_shift' class="method"><code id='build_left_shift.v'>pub fn <a href='#method.build_left_shift' class='fnname'>build_left_shift</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, lhs: T, rhs: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#815-823' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds an <code>IntValue</code> containing the result of a logical left shift instruction.</p>
<h1 id="example-8" class="section-header"><a href="#example-8">Example</a></h1>
<p>A logical left shift is an operation in which an integer value's bits are shifted left by N number of positions.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b0000_0001</span> <span class="op">&lt;</span><span class="op">&lt;</span> <span class="number">0</span>, <span class="number">0b0000_0001</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b0000_0001</span> <span class="op">&lt;</span><span class="op">&lt;</span> <span class="number">1</span>, <span class="number">0b0000_0010</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b0000_0011</span> <span class="op">&lt;</span><span class="op">&lt;</span> <span class="number">2</span>, <span class="number">0b0000_1100</span>);</pre></div>
<p>In Rust, a function that could do this for 8bit values looks like:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">fn</span> <span class="ident">left_shift</span>(<span class="ident">value</span>: <span class="ident">u8</span>, <span class="ident">n</span>: <span class="ident">u8</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">u8</span> {
<span class="ident">value</span> <span class="op">&lt;</span><span class="op">&lt;</span> <span class="ident">n</span>
}</pre></div>
<p>And in Inkwell, the corresponding function would look roughly like:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="comment">// Setup</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;my_module&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">i8_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i8_type</span>();
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">i8_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i8_type</span>.<span class="ident">into</span>(), <span class="ident">i8_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="comment">// Function Definition</span>
<span class="kw">let</span> <span class="ident">function</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;left_shift&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="ident">function</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_int_value</span>();
<span class="kw">let</span> <span class="ident">n</span> <span class="op">=</span> <span class="ident">function</span>.<span class="ident">get_nth_param</span>(<span class="number">1</span>).<span class="ident">unwrap</span>().<span class="ident">into_int_value</span>();
<span class="kw">let</span> <span class="ident">entry_block</span> <span class="op">=</span> <span class="ident">function</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry_block</span>);
<span class="kw">let</span> <span class="ident">shift</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_left_shift</span>(<span class="ident">value</span>, <span class="ident">n</span>, <span class="string">&quot;left_shift&quot;</span>); <span class="comment">// value &lt;&lt; n</span>
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">shift</span>));</pre></div>
</div><h4 id='method.build_right_shift' class="method"><code id='build_right_shift.v'>pub fn <a href='#method.build_right_shift' class='fnname'>build_right_shift</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;sign_extend: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#889-901' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds an <code>IntValue</code> containing the result of a right shift instruction.</p>
<h1 id="example-9" class="section-header"><a href="#example-9">Example</a></h1>
<p>A right shift is an operation in which an integer value's bits are shifted right by N number of positions.
It may either be logical and have its leftmost N bit(s) filled with zeros or sign extended and filled with ones
if the leftmost bit was one.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="comment">//fix doc error about overflowing_literals</span>
<span class="comment">//rendered rfc: https://github.com/rust-lang/rfcs/blob/master/text/2438-deny-integer-literal-overflow-lint.md</span>
<span class="comment">//tracking issue: https://github.com/rust-lang/rust/issues/54502</span>
<span class="attribute">#![<span class="ident">allow</span>(<span class="ident">overflowing_literals</span>)]</span>
<span class="comment">// Logical Right Shift</span>
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b1100_0000u8</span> <span class="op">&gt;</span><span class="op">&gt;</span> <span class="number">2</span>, <span class="number">0b0011_0000</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b0000_0010u8</span> <span class="op">&gt;</span><span class="op">&gt;</span> <span class="number">1</span>, <span class="number">0b0000_0001</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b0000_1100u8</span> <span class="op">&gt;</span><span class="op">&gt;</span> <span class="number">2</span>, <span class="number">0b0000_0011</span>);
<span class="comment">// Sign Extended Right Shift</span>
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b0100_0000i8</span> <span class="op">&gt;</span><span class="op">&gt;</span> <span class="number">2</span>, <span class="number">0b0001_0000</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b1110_0000u8</span> <span class="kw">as</span> <span class="ident">i8</span> <span class="op">&gt;</span><span class="op">&gt;</span> <span class="number">1</span>, <span class="number">0b1111_0000u8</span> <span class="kw">as</span> <span class="ident">i8</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0b1100_0000u8</span> <span class="kw">as</span> <span class="ident">i8</span> <span class="op">&gt;</span><span class="op">&gt;</span> <span class="number">2</span>, <span class="number">0b1111_0000u8</span> <span class="kw">as</span> <span class="ident">i8</span>);</pre></div>
<p>In Rust, functions that could do this for 8bit values look like:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">fn</span> <span class="ident">logical_right_shift</span>(<span class="ident">value</span>: <span class="ident">u8</span>, <span class="ident">n</span>: <span class="ident">u8</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">u8</span> {
<span class="ident">value</span> <span class="op">&gt;</span><span class="op">&gt;</span> <span class="ident">n</span>
}
<span class="kw">fn</span> <span class="ident">sign_extended_right_shift</span>(<span class="ident">value</span>: <span class="ident">i8</span>, <span class="ident">n</span>: <span class="ident">u8</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">i8</span> {
<span class="ident">value</span> <span class="op">&gt;</span><span class="op">&gt;</span> <span class="ident">n</span>
}</pre></div>
<p>Notice that, in Rust (and most other languages), whether or not a value is sign extended depends wholly on whether
or not the type is signed (ie an i8 is a signed 8 bit value). LLVM does not make this distinction for you.</p>
<p>In Inkwell, the corresponding functions would look roughly like:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="comment">// Setup</span>
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;my_module&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">i8_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i8_type</span>();
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">i8_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i8_type</span>.<span class="ident">into</span>(), <span class="ident">i8_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="comment">// Function Definition</span>
<span class="kw">let</span> <span class="ident">function</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;right_shift&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="ident">function</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_int_value</span>();
<span class="kw">let</span> <span class="ident">n</span> <span class="op">=</span> <span class="ident">function</span>.<span class="ident">get_nth_param</span>(<span class="number">1</span>).<span class="ident">unwrap</span>().<span class="ident">into_int_value</span>();
<span class="kw">let</span> <span class="ident">entry_block</span> <span class="op">=</span> <span class="ident">function</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry_block</span>);
<span class="comment">// Whether or not your right shift is sign extended (true) or logical (false) depends</span>
<span class="comment">// on the boolean input parameter:</span>
<span class="kw">let</span> <span class="ident">shift</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_right_shift</span>(<span class="ident">value</span>, <span class="ident">n</span>, <span class="bool-val">false</span>, <span class="string">&quot;right_shift&quot;</span>); <span class="comment">// value &gt;&gt; n</span>
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">shift</span>));</pre></div>
</div><h4 id='method.build_int_sub' class="method"><code id='build_int_sub.v'>pub fn <a href='#method.build_int_sub' class='fnname'>build_int_sub</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, lhs: T, rhs: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#904-912' title='goto source code'>[src]</a></h4><h4 id='method.build_int_nsw_sub' class="method"><code id='build_int_nsw_sub.v'>pub fn <a href='#method.build_int_nsw_sub' class='fnname'>build_int_nsw_sub</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#915-923' title='goto source code'>[src]</a></h4><h4 id='method.build_int_nuw_sub' class="method"><code id='build_int_nuw_sub.v'>pub fn <a href='#method.build_int_nuw_sub' class='fnname'>build_int_nuw_sub</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#927-935' title='goto source code'>[src]</a></h4><h4 id='method.build_float_sub' class="method"><code id='build_float_sub.v'>pub fn <a href='#method.build_float_sub' class='fnname'>build_float_sub</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#938-946' title='goto source code'>[src]</a></h4><h4 id='method.build_int_mul' class="method"><code id='build_int_mul.v'>pub fn <a href='#method.build_int_mul' class='fnname'>build_int_mul</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, lhs: T, rhs: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#949-957' title='goto source code'>[src]</a></h4><h4 id='method.build_int_nsw_mul' class="method"><code id='build_int_nsw_mul.v'>pub fn <a href='#method.build_int_nsw_mul' class='fnname'>build_int_nsw_mul</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#961-969' title='goto source code'>[src]</a></h4><h4 id='method.build_int_nuw_mul' class="method"><code id='build_int_nuw_mul.v'>pub fn <a href='#method.build_int_nuw_mul' class='fnname'>build_int_nuw_mul</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#973-981' title='goto source code'>[src]</a></h4><h4 id='method.build_float_mul' class="method"><code id='build_float_mul.v'>pub fn <a href='#method.build_float_mul' class='fnname'>build_float_mul</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#984-992' title='goto source code'>[src]</a></h4><h4 id='method.build_cast' class="method"><code id='build_cast.v'>pub fn <a href='#method.build_cast' class='fnname'>build_cast</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/types/trait.BasicType.html" title="trait inkwell::types::BasicType">BasicType</a>, V:&nbsp;<a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;op: <a class="enum" href="../../inkwell/values/enum.InstructionOpcode.html" title="enum inkwell::values::InstructionOpcode">InstructionOpcode</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;from_value: V, <br>&nbsp;&nbsp;&nbsp;&nbsp;to_type: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#994-1002' title='goto source code'>[src]</a></h4><h4 id='method.build_pointer_cast' class="method"><code id='build_pointer_cast.v'>pub fn <a href='#method.build_pointer_cast' class='fnname'>build_pointer_cast</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.PointerMathValue.html" title="trait inkwell::values::PointerMathValue">PointerMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;from: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;to: T::<a class="type" href="../../inkwell/values/trait.PointerMathValue.html#associatedtype.BaseType" title="type inkwell::values::PointerMathValue::BaseType">BaseType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1005-1013' title='goto source code'>[src]</a></h4><h4 id='method.build_int_compare' class="method"><code id='build_int_compare.v'>pub fn <a href='#method.build_int_compare' class='fnname'>build_int_compare</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;op: <a class="enum" href="../../inkwell/enum.IntPredicate.html" title="enum inkwell::IntPredicate">IntPredicate</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1019-1027' title='goto source code'>[src]</a></h4><h4 id='method.build_float_compare' class="method"><code id='build_float_compare.v'>pub fn <a href='#method.build_float_compare' class='fnname'>build_float_compare</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;op: <a class="enum" href="../../inkwell/enum.FloatPredicate.html" title="enum inkwell::FloatPredicate">FloatPredicate</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;lhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;rhs: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.FloatMathValue.html#associatedtype.BaseType" title="type inkwell::values::FloatMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.FloatMathType.html" title="trait inkwell::types::FloatMathType">FloatMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.FloatMathType.html#associatedtype.MathConvType" title="type inkwell::types::FloatMathType::MathConvType">MathConvType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.ValueType" title="type inkwell::types::IntMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1031-1039' title='goto source code'>[src]</a></h4><h4 id='method.build_unconditional_branch' class="method"><code id='build_unconditional_branch.v'>pub fn <a href='#method.build_unconditional_branch' class='fnname'>build_unconditional_branch</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;destination_block: &amp;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1041-1047' title='goto source code'>[src]</a></h4><h4 id='method.build_conditional_branch' class="method"><code id='build_conditional_branch.v'>pub fn <a href='#method.build_conditional_branch' class='fnname'>build_conditional_branch</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;comparison: <a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;then_block: &amp;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;else_block: &amp;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1049-1055' title='goto source code'>[src]</a></h4><h4 id='method.build_indirect_branch' class="method"><code id='build_indirect_branch.v'>pub fn <a href='#method.build_indirect_branch' class='fnname'>build_indirect_branch</a>&lt;BV:&nbsp;<a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;address: BV, <br>&nbsp;&nbsp;&nbsp;&nbsp;destinations: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a>&amp;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1057-1069' title='goto source code'>[src]</a></h4><h4 id='method.build_int_neg' class="method"><code id='build_int_neg.v'>pub fn <a href='#method.build_int_neg' class='fnname'>build_int_neg</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, value: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1072-1080' title='goto source code'>[src]</a></h4><h4 id='method.build_int_nsw_neg' class="method"><code id='build_int_nsw_neg.v'>pub fn <a href='#method.build_int_nsw_neg' class='fnname'>build_int_nsw_neg</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, value: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1084-1092' title='goto source code'>[src]</a></h4><h4 id='method.build_int_nuw_neg' class="method"><code id='build_int_nuw_neg.v'>pub fn <a href='#method.build_int_nuw_neg' class='fnname'>build_int_nuw_neg</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, value: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1095-1103' title='goto source code'>[src]</a></h4><h4 id='method.build_float_neg' class="method"><code id='build_float_neg.v'>pub fn <a href='#method.build_float_neg' class='fnname'>build_float_neg</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.FloatMathValue.html" title="trait inkwell::values::FloatMathValue">FloatMathValue</a>&gt;(&amp;self, value: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1106-1114' title='goto source code'>[src]</a></h4><h4 id='method.build_not' class="method"><code id='build_not.v'>pub fn <a href='#method.build_not' class='fnname'>build_not</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(&amp;self, value: T, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; T</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1117-1125' title='goto source code'>[src]</a></h4><h4 id='method.position_at' class="method"><code id='position_at.v'>pub fn <a href='#method.position_at' class='fnname'>position_at</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;basic_block: &amp;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;instruction: &amp;<a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a><br>)</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1129-1133' title='goto source code'>[src]</a></h4><h4 id='method.position_before' class="method"><code id='position_before.v'>pub fn <a href='#method.position_before' class='fnname'>position_before</a>(&amp;self, instruction: &amp;<a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a>)</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1135-1139' title='goto source code'>[src]</a></h4><h4 id='method.position_at_end' class="method"><code id='position_at_end.v'>pub fn <a href='#method.position_at_end' class='fnname'>position_at_end</a>(&amp;self, basic_block: &amp;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a>)</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1141-1145' title='goto source code'>[src]</a></h4><h4 id='method.build_extract_value' class="method"><code id='build_extract_value.v'>pub fn <a href='#method.build_extract_value' class='fnname'>build_extract_value</a>&lt;AV:&nbsp;<a class="trait" href="../../inkwell/values/trait.AggregateValue.html" title="trait inkwell::values::AggregateValue">AggregateValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;agg: AV, <br>&nbsp;&nbsp;&nbsp;&nbsp;index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a>&gt;</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1185-1202' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds an extract value instruction which extracts a <code>BasicValueEnum</code>
from a struct or array.</p>
<h1 id="example-10" class="section-header"><a href="#example-10">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;av&quot;</span>);
<span class="kw">let</span> <span class="ident">void_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">void_type</span>();
<span class="kw">let</span> <span class="ident">f32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">f32_type</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">struct_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">struct_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_type</span>.<span class="ident">into</span>(), <span class="ident">f32_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">array_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">array_type</span>(<span class="number">3</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">void_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;av_fn&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="kw">let</span> <span class="ident">array_alloca</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_alloca</span>(<span class="ident">array_type</span>, <span class="string">&quot;array_alloca&quot;</span>);
<span class="kw">let</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_load</span>(<span class="ident">array_alloca</span>, <span class="string">&quot;array_load&quot;</span>).<span class="ident">into_array_value</span>();
<span class="kw">let</span> <span class="ident">const_int1</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">2</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">const_int2</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">5</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">const_int3</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">6</span>, <span class="bool-val">false</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_insert_value</span>(<span class="ident">array</span>, <span class="ident">const_int1</span>, <span class="number">0</span>, <span class="string">&quot;insert&quot;</span>).<span class="ident">is_some</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_insert_value</span>(<span class="ident">array</span>, <span class="ident">const_int2</span>, <span class="number">1</span>, <span class="string">&quot;insert&quot;</span>).<span class="ident">is_some</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_insert_value</span>(<span class="ident">array</span>, <span class="ident">const_int3</span>, <span class="number">2</span>, <span class="string">&quot;insert&quot;</span>).<span class="ident">is_some</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_insert_value</span>(<span class="ident">array</span>, <span class="ident">const_int3</span>, <span class="number">3</span>, <span class="string">&quot;insert&quot;</span>).<span class="ident">is_none</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_extract_value</span>(<span class="ident">array</span>, <span class="number">0</span>, <span class="string">&quot;extract&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">is_int_value</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_extract_value</span>(<span class="ident">array</span>, <span class="number">1</span>, <span class="string">&quot;extract&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">is_int_value</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_extract_value</span>(<span class="ident">array</span>, <span class="number">2</span>, <span class="string">&quot;extract&quot;</span>).<span class="ident">unwrap</span>().<span class="ident">is_int_value</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_extract_value</span>(<span class="ident">array</span>, <span class="number">3</span>, <span class="string">&quot;extract&quot;</span>).<span class="ident">is_none</span>());</pre></div>
</div><h4 id='method.build_insert_value' class="method"><code id='build_insert_value.v'>pub fn <a href='#method.build_insert_value' class='fnname'>build_insert_value</a>&lt;AV, BV&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;agg: AV, <br>&nbsp;&nbsp;&nbsp;&nbsp;value: BV, <br>&nbsp;&nbsp;&nbsp;&nbsp;index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="../../inkwell/values/enum.AggregateValueEnum.html" title="enum inkwell::values::AggregateValueEnum">AggregateValueEnum</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;AV: <a class="trait" href="../../inkwell/values/trait.AggregateValue.html" title="trait inkwell::values::AggregateValue">AggregateValue</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;BV: <a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>,&nbsp;</span></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1237-1258' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds an insert value instruction which inserts a <code>BasicValue</code> into a struct
or array and returns the resulting aggregate value.</p>
<h1 id="example-11" class="section-header"><a href="#example-11">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;av&quot;</span>);
<span class="kw">let</span> <span class="ident">void_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">void_type</span>();
<span class="kw">let</span> <span class="ident">f32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">f32_type</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">struct_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">struct_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_type</span>.<span class="ident">into</span>(), <span class="ident">f32_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">array_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">array_type</span>(<span class="number">3</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">void_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;av_fn&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="kw">let</span> <span class="ident">array_alloca</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_alloca</span>(<span class="ident">array_type</span>, <span class="string">&quot;array_alloca&quot;</span>);
<span class="kw">let</span> <span class="ident">array</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_load</span>(<span class="ident">array_alloca</span>, <span class="string">&quot;array_load&quot;</span>).<span class="ident">into_array_value</span>();
<span class="kw">let</span> <span class="ident">const_int1</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">2</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">const_int2</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">5</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">const_int3</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">6</span>, <span class="bool-val">false</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_insert_value</span>(<span class="ident">array</span>, <span class="ident">const_int1</span>, <span class="number">0</span>, <span class="string">&quot;insert&quot;</span>).<span class="ident">is_some</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_insert_value</span>(<span class="ident">array</span>, <span class="ident">const_int2</span>, <span class="number">1</span>, <span class="string">&quot;insert&quot;</span>).<span class="ident">is_some</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_insert_value</span>(<span class="ident">array</span>, <span class="ident">const_int3</span>, <span class="number">2</span>, <span class="string">&quot;insert&quot;</span>).<span class="ident">is_some</span>());
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">builder</span>.<span class="ident">build_insert_value</span>(<span class="ident">array</span>, <span class="ident">const_int3</span>, <span class="number">3</span>, <span class="string">&quot;insert&quot;</span>).<span class="ident">is_none</span>());</pre></div>
</div><h4 id='method.build_extract_element' class="method"><code id='build_extract_element.v'>pub fn <a href='#method.build_extract_element' class='fnname'>build_extract_element</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;vector: <a class="struct" href="../../inkwell/values/struct.VectorValue.html" title="struct inkwell::values::VectorValue">VectorValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;index: <a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1284-1292' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds an extract element instruction which extracts a <code>BasicValueEnum</code>
from a vector.</p>
<h1 id="example-12" class="section-header"><a href="#example-12">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;av&quot;</span>);
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">i32_zero</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">0</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">vec_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">vec_type</span>(<span class="number">2</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">vec_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;vec_fn&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">vector_param</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_vector_value</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="kw">let</span> <span class="ident">extracted</span> <span class="op">=</span> <span class="ident">builder</span>.<span class="ident">build_extract_element</span>(<span class="ident">vector_param</span>, <span class="ident">i32_zero</span>, <span class="string">&quot;insert&quot;</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">extracted</span>));</pre></div>
</div><h4 id='method.build_insert_element' class="method"><code id='build_insert_element.v'>pub fn <a href='#method.build_insert_element' class='fnname'>build_insert_element</a>&lt;V:&nbsp;<a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;vector: <a class="struct" href="../../inkwell/values/struct.VectorValue.html" title="struct inkwell::values::VectorValue">VectorValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;element: V, <br>&nbsp;&nbsp;&nbsp;&nbsp;index: <a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.VectorValue.html" title="struct inkwell::values::VectorValue">VectorValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1319-1327' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds an insert element instruction which inserts a <code>BasicValue</code> into a vector
and returns the resulting vector.</p>
<h1 id="example-13" class="section-header"><a href="#example-13">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;av&quot;</span>);
<span class="kw">let</span> <span class="ident">void_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">void_type</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">i32_zero</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">0</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">i32_seven</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">7</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">vec_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">vec_type</span>(<span class="number">2</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">void_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">vec_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;vec_fn&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">vector_param</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_vector_value</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="ident">builder</span>.<span class="ident">build_insert_element</span>(<span class="ident">vector_param</span>, <span class="ident">i32_seven</span>, <span class="ident">i32_zero</span>, <span class="string">&quot;insert&quot;</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">None</span>);</pre></div>
</div><h4 id='method.build_unreachable' class="method"><code id='build_unreachable.v'>pub fn <a href='#method.build_unreachable' class='fnname'>build_unreachable</a>(&amp;self) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1329-1335' title='goto source code'>[src]</a></h4><h4 id='method.build_fence' class="method"><code id='build_fence.v'>pub fn <a href='#method.build_fence' class='fnname'>build_fence</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;atomic_ordering: <a class="enum" href="../../inkwell/enum.AtomicOrdering.html" title="enum inkwell::AtomicOrdering">AtomicOrdering</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;num: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1339-1347' title='goto source code'>[src]</a></h4><h4 id='method.build_is_null' class="method"><code id='build_is_null.v'>pub fn <a href='#method.build_is_null' class='fnname'>build_is_null</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.PointerMathValue.html" title="trait inkwell::values::PointerMathValue">PointerMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.PointerMathValue.html#associatedtype.BaseType" title="type inkwell::values::PointerMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.PointerMathType.html" title="trait inkwell::types::PointerMathType">PointerMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.PointerMathType.html#associatedtype.PtrConvType" title="type inkwell::types::PointerMathType::PtrConvType">PtrConvType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.ValueType" title="type inkwell::types::IntMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1350-1358' title='goto source code'>[src]</a></h4><h4 id='method.build_is_not_null' class="method"><code id='build_is_not_null.v'>pub fn <a href='#method.build_is_not_null' class='fnname'>build_is_not_null</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.PointerMathValue.html" title="trait inkwell::values::PointerMathValue">PointerMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.PointerMathValue.html#associatedtype.BaseType" title="type inkwell::values::PointerMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.PointerMathType.html" title="trait inkwell::types::PointerMathType">PointerMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.PointerMathType.html#associatedtype.PtrConvType" title="type inkwell::types::PointerMathType::PtrConvType">PtrConvType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.ValueType" title="type inkwell::types::IntMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1361-1369' title='goto source code'>[src]</a></h4><h4 id='method.build_int_to_ptr' class="method"><code id='build_int_to_ptr.v'>pub fn <a href='#method.build_int_to_ptr' class='fnname'>build_int_to_ptr</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;int: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr_type: &lt;T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.PtrConvType" title="type inkwell::types::IntMathType::PtrConvType">PtrConvType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.IntMathValue.html#associatedtype.BaseType" title="type inkwell::values::IntMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.PtrConvType" title="type inkwell::types::IntMathType::PtrConvType">PtrConvType</a> as <a class="trait" href="../../inkwell/types/trait.PointerMathType.html" title="trait inkwell::types::PointerMathType">PointerMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.PointerMathType.html#associatedtype.ValueType" title="type inkwell::types::PointerMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1372-1380' title='goto source code'>[src]</a></h4><h4 id='method.build_ptr_to_int' class="method"><code id='build_ptr_to_int.v'>pub fn <a href='#method.build_ptr_to_int' class='fnname'>build_ptr_to_int</a>&lt;T:&nbsp;<a class="trait" href="../../inkwell/values/trait.PointerMathValue.html" title="trait inkwell::values::PointerMathValue">PointerMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: T, <br>&nbsp;&nbsp;&nbsp;&nbsp;int_type: &lt;T::<a class="type" href="../../inkwell/values/trait.PointerMathValue.html#associatedtype.BaseType" title="type inkwell::values::PointerMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.PointerMathType.html" title="trait inkwell::types::PointerMathType">PointerMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.PointerMathType.html#associatedtype.PtrConvType" title="type inkwell::types::PointerMathType::PtrConvType">PtrConvType</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; &lt;&lt;T::<a class="type" href="../../inkwell/values/trait.PointerMathValue.html#associatedtype.BaseType" title="type inkwell::values::PointerMathValue::BaseType">BaseType</a> as <a class="trait" href="../../inkwell/types/trait.PointerMathType.html" title="trait inkwell::types::PointerMathType">PointerMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.PointerMathType.html#associatedtype.PtrConvType" title="type inkwell::types::PointerMathType::PtrConvType">PtrConvType</a> as <a class="trait" href="../../inkwell/types/trait.IntMathType.html" title="trait inkwell::types::IntMathType">IntMathType</a>&gt;::<a class="type" href="../../inkwell/types/trait.IntMathType.html#associatedtype.ValueType" title="type inkwell::types::IntMathType::ValueType">ValueType</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1383-1391' title='goto source code'>[src]</a></h4><h4 id='method.clear_insertion_position' class="method"><code id='clear_insertion_position.v'>pub fn <a href='#method.clear_insertion_position' class='fnname'>clear_insertion_position</a>(&amp;self)</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1393-1397' title='goto source code'>[src]</a></h4><h4 id='method.build_switch' class="method"><code id='build_switch.v'>pub fn <a href='#method.build_switch' class='fnname'>build_switch</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;value: <a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;else_block: &amp;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;cases: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, &amp;<a class="struct" href="../../inkwell/basic_block/struct.BasicBlock.html" title="struct inkwell::basic_block::BasicBlock">BasicBlock</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.InstructionValue.html" title="struct inkwell::values::InstructionValue">InstructionValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1402-1414' title='goto source code'>[src]</a></h4><h4 id='method.build_select' class="method"><code id='build_select.v'>pub fn <a href='#method.build_select' class='fnname'>build_select</a>&lt;BV:&nbsp;<a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>, IMV:&nbsp;<a class="trait" href="../../inkwell/values/trait.IntMathValue.html" title="trait inkwell::values::IntMathValue">IntMathValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;condition: IMV, <br>&nbsp;&nbsp;&nbsp;&nbsp;then: BV, <br>&nbsp;&nbsp;&nbsp;&nbsp;else_: BV, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1417-1424' title='goto source code'>[src]</a></h4><h4 id='method.build_global_string' class="method"><code id='build_global_string.v'>pub unsafe fn <a href='#method.build_global_string' class='fnname'>build_global_string</a>(&amp;self, value: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../../inkwell/values/struct.GlobalValue.html" title="struct inkwell::values::GlobalValue">GlobalValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1427-1433' title='goto source code'>[src]</a></h4><h4 id='method.build_global_string_ptr' class="method"><code id='build_global_string_ptr.v'>pub fn <a href='#method.build_global_string_ptr' class='fnname'>build_global_string_ptr</a>(&amp;self, value: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="struct" href="../../inkwell/values/struct.GlobalValue.html" title="struct inkwell::values::GlobalValue">GlobalValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1437-1445' title='goto source code'>[src]</a></h4><h4 id='method.build_shuffle_vector' class="method"><code id='build_shuffle_vector.v'>pub fn <a href='#method.build_shuffle_vector' class='fnname'>build_shuffle_vector</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;left: <a class="struct" href="../../inkwell/values/struct.VectorValue.html" title="struct inkwell::values::VectorValue">VectorValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;right: <a class="struct" href="../../inkwell/values/struct.VectorValue.html" title="struct inkwell::values::VectorValue">VectorValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;mask: <a class="struct" href="../../inkwell/values/struct.VectorValue.html" title="struct inkwell::values::VectorValue">VectorValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="struct" href="../../inkwell/values/struct.VectorValue.html" title="struct inkwell::values::VectorValue">VectorValue</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1448-1455' title='goto source code'>[src]</a></h4><h4 id='method.build_va_arg' class="method"><code id='build_va_arg.v'>pub fn <a href='#method.build_va_arg' class='fnname'>build_va_arg</a>&lt;BT:&nbsp;<a class="trait" href="../../inkwell/types/trait.BasicType.html" title="trait inkwell::types::BasicType">BasicType</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;list: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;type_: BT, <br>&nbsp;&nbsp;&nbsp;&nbsp;name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -&gt; <a class="enum" href="../../inkwell/values/enum.BasicValueEnum.html" title="enum inkwell::values::BasicValueEnum">BasicValueEnum</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#1460-1468' title='goto source code'>[src]</a></h4><h4 id='method.build_atomicrmw' class="method"><code id='build_atomicrmw.v'>pub fn <a href='#method.build_atomicrmw' class='fnname'>build_atomicrmw</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;op: <a class="enum" href="../../inkwell/enum.AtomicRMWBinOp.html" title="enum inkwell::AtomicRMWBinOp">AtomicRMWBinOp</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;value: <a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;ordering: <a class="enum" href="../../inkwell/enum.AtomicOrdering.html" title="enum inkwell::AtomicOrdering">AtomicOrdering</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../inkwell/values/struct.IntValue.html" title="struct inkwell::values::IntValue">IntValue</a>, &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1493-1510' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds an atomicrmw instruction. It allows you to atomically modify memory.</p>
<h1 id="example-14" class="section-header"><a href="#example-14">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">use</span> <span class="ident">inkwell</span>::{<span class="ident">AddressSpace</span>, <span class="ident">AtomicOrdering</span>, <span class="ident">AtomicRMWBinOp</span>};
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;rmw&quot;</span>);
<span class="kw">let</span> <span class="ident">void_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">void_type</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">i32_seven</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">7</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">i32_ptr_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">ptr_type</span>(<span class="ident">AddressSpace</span>::<span class="ident">Generic</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">void_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_ptr_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;rmw&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">i32_ptr_param</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_pointer_value</span>();
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="ident">builder</span>.<span class="ident">build_atomicrmw</span>(<span class="ident">AtomicRMWBinOp</span>::<span class="ident">Add</span>, <span class="ident">i32_ptr_param</span>, <span class="ident">i32_seven</span>, <span class="ident">AtomicOrdering</span>::<span class="ident">Unordered</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">None</span>);</pre></div>
</div><h4 id='method.build_cmpxchg' class="method"><code id='build_cmpxchg.v'>pub fn <a href='#method.build_cmpxchg' class='fnname'>build_cmpxchg</a>&lt;V:&nbsp;<a class="trait" href="../../inkwell/values/trait.BasicValue.html" title="trait inkwell::values::BasicValue">BasicValue</a>&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ptr: <a class="struct" href="../../inkwell/values/struct.PointerValue.html" title="struct inkwell::values::PointerValue">PointerValue</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;cmp: V, <br>&nbsp;&nbsp;&nbsp;&nbsp;new: V, <br>&nbsp;&nbsp;&nbsp;&nbsp;success: <a class="enum" href="../../inkwell/enum.AtomicOrdering.html" title="enum inkwell::AtomicOrdering">AtomicOrdering</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;failure: <a class="enum" href="../../inkwell/enum.AtomicOrdering.html" title="enum inkwell::AtomicOrdering">AtomicOrdering</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../inkwell/values/struct.StructValue.html" title="struct inkwell::values::StructValue">StructValue</a>, &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1537-1566' title='goto source code'>[src]</a></h4><div class='docblock'><p>Builds a cmpxchg instruction. It allows you to atomically compare and replace memory.</p>
<h1 id="example-15" class="section-header"><a href="#example-15">Example</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">inkwell</span>::<span class="ident">context</span>::<span class="ident">Context</span>;
<span class="kw">use</span> <span class="ident">inkwell</span>::{<span class="ident">AddressSpace</span>, <span class="ident">AtomicOrdering</span>};
<span class="kw">let</span> <span class="ident">context</span> <span class="op">=</span> <span class="ident">Context</span>::<span class="ident">create</span>();
<span class="kw">let</span> <span class="ident">module</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_module</span>(<span class="string">&quot;cmpxchg&quot;</span>);
<span class="kw">let</span> <span class="ident">void_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">void_type</span>();
<span class="kw">let</span> <span class="ident">i32_type</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">i32_type</span>();
<span class="kw">let</span> <span class="ident">i32_ptr_type</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">ptr_type</span>(<span class="ident">AddressSpace</span>::<span class="ident">Generic</span>);
<span class="kw">let</span> <span class="ident">fn_type</span> <span class="op">=</span> <span class="ident">void_type</span>.<span class="ident">fn_type</span>(<span class="kw-2">&amp;</span>[<span class="ident">i32_ptr_type</span>.<span class="ident">into</span>()], <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">fn_value</span> <span class="op">=</span> <span class="ident">module</span>.<span class="ident">add_function</span>(<span class="string">&quot;&quot;</span>, <span class="ident">fn_type</span>, <span class="prelude-val">None</span>);
<span class="kw">let</span> <span class="ident">i32_ptr_param</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">get_first_param</span>().<span class="ident">unwrap</span>().<span class="ident">into_pointer_value</span>();
<span class="kw">let</span> <span class="ident">i32_seven</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">7</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">i32_eight</span> <span class="op">=</span> <span class="ident">i32_type</span>.<span class="ident">const_int</span>(<span class="number">8</span>, <span class="bool-val">false</span>);
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="ident">fn_value</span>.<span class="ident">append_basic_block</span>(<span class="string">&quot;entry&quot;</span>);
<span class="kw">let</span> <span class="ident">builder</span> <span class="op">=</span> <span class="ident">context</span>.<span class="ident">create_builder</span>();
<span class="ident">builder</span>.<span class="ident">position_at_end</span>(<span class="kw-2">&amp;</span><span class="ident">entry</span>);
<span class="ident">builder</span>.<span class="ident">build_cmpxchg</span>(<span class="ident">i32_ptr_param</span>, <span class="ident">i32_seven</span>, <span class="ident">i32_eight</span>, <span class="ident">AtomicOrdering</span>::<span class="ident">AcquireRelease</span>, <span class="ident">AtomicOrdering</span>::<span class="ident">Monotonic</span>);
<span class="ident">builder</span>.<span class="ident">build_return</span>(<span class="prelude-val">None</span>);</pre></div>
</div></div><h2 id='implementations' class='small-section-header'>Trait Implementations<a href='#implementations' class='anchor'></a></h2><div id='implementations-list'><h3 id='impl-Drop' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html" title="trait core::ops::drop::Drop">Drop</a> for <a class="struct" href="../../inkwell/builder/struct.Builder.html" title="struct inkwell::builder::Builder">Builder</a></code><a href='#impl-Drop' class='anchor'></a><a class='srclink' href='../../src/inkwell/builder.rs.html#1569-1575' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.drop' class="method hidden"><code id='drop.v'>fn <a href='https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&amp;mut self)</code><a class='srclink' href='../../src/inkwell/builder.rs.html#1570-1574' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Executes the destructor for this type. <a href="https://doc.rust-lang.org/nightly/core/ops/drop/trait.Drop.html#tymethod.drop">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../inkwell/builder/struct.Builder.html" title="struct inkwell::builder::Builder">Builder</a></code><a href='#impl-Debug' class='anchor'></a><a class='srclink' href='../../src/inkwell/builder.rs.html#17' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.fmt' class="method hidden"><code id='fmt.v'>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class='srclink' href='../../src/inkwell/builder.rs.html#17' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Sync' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../inkwell/builder/struct.Builder.html" title="struct inkwell::builder::Builder">Builder</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../inkwell/builder/struct.Builder.html" title="struct inkwell::builder::Builder">Builder</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../inkwell/builder/struct.Builder.html" title="struct inkwell::builder::Builder">Builder</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../inkwell/builder/struct.Builder.html" title="struct inkwell::builder::Builder">Builder</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../inkwell/builder/struct.Builder.html" title="struct inkwell::builder::Builder">Builder</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-548' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -&gt; U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#545-547' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#552-554' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -&gt; T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#571-577' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#574-576' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,&nbsp;</span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#559-566' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#563-565' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "inkwell";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>