<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="Represents a reference to an LLVM `Module`. The underlying module will be disposed when dropping this object."><title>Module in inkwell::module - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../static.files/rustdoc-5bc39a1768837dd0.css"><metaname="rustdoc-vars"data-root-path="../../"data-static-root-path="../../static.files/"data-current-crate="inkwell"data-themes=""data-resource-suffix=""data-rustdoc-version="1.77.1 (7cf61ebde 2024-03-27)"data-channel="1.77.1"data-search-js="search-dd67cee4cfa65049.js"data-settings-js="settings-4313503d2e1961c2.js"><scriptsrc="../../static.files/storage-4c98445ec4002617.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../static.files/main-48f368f3872407c8.js"></script><noscript><linkrel="stylesheet"href="../../static.files/noscript-04d5337699b92874.css"></noscript><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle"title="show sidebar"></button></nav><navclass="sidebar"><divclass="sidebar-crate"><h2><ahref="../../inkwell/index.html">inkwell</a><spanclass="version">0.4.0</span></h2></div><h2class="location"><ahref="#">Module</a></h2><divclass="sidebar-elems"><section><h3><ahref="#implementations">Methods</a></h3><ulclass="block method"><li><ahref="#method.add_basic_value_flag">add_basic_value_flag</a></li><li><ahref="#method.add_function">add_function</a></li><li><ahref="#method.add_global">add_global</a></li><li><ahref="#method.add_global_metadata">add_global_metadata</a></li><li><ahref="#method.add_metadata_flag">add_metadata_flag</a></li><li><ahref="#method.as_mut_ptr">as_mut_ptr</a></li><li><ahref="#method.create_debug_info_builder">create_debug_info_builder</a></li><li><ahref="#method.create_execution_engine">create_execution_engine</a></li><li><ahref="#method.create_interpreter_execution_engine">create_interpreter_execution_engine</a></li><li><ahref="#method.create_jit_execution_engine">create_jit_execution_engine</a></li><li><ahref="#method.get_context">get_context</a></li><li><ahref="#method.get_data_layout">get_data_layout</a></li><li><ahref="#method.get_debug_metadata_version">get_debug_metadata_version</a></li><li><ahref="#method.get_first_function">get_first_function</a></li><li><ahref="#method.get_first_global">get_first_global</a></li><li><ahref="#method.get_flag">get_flag</a></li><li><ahref="#method.get_function">get_function</a></li><li><ahref="#method.get_functions">get_functions</a></li><li><ahref="#method.get_global">get_global</a></li><li><ahref="#method.get_global_metadata">get_global_metadata</a></li><li><ahref="#method.get_global_metadata_size">get_global_metadata_size</a></li><li><ahref="#metho
<main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><divid="sidebar-button"tabindex="-1"><ahref="../../inkwell/all.html"title="show sidebar"></a></div><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"tabindex="-1"><ahref="../../help.html"title="help">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Struct <ahref="../index.html">inkwell</a>::<wbr><ahref="index.html">module</a>::<wbr><aclass="struct"href="#">Module</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../src/inkwell/module.rs.html#168-173">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><preclass="rust item-decl"><code>pub struct Module<'ctx> { <spanclass="comment">/* private fields */</span> }</code></pre><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>Represents a reference to an LLVM <code>Module</code>.
The underlying module will be disposed when dropping this object.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.as_mut_ptr"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#193-195">source</a><h4class="code-header">pub fn <ahref="#method.as_mut_ptr"class="fn">as_mut_ptr</a>(&self) -><aclass="type"href="../../llvm_sys/prelude/type.LLVMModuleRef.html"title="type llvm_sys::prelude::LLVMModuleRef">LLVMModuleRef</a></h4></section></summary><divclass="docblock"><p>Acquires the underlying raw pointer belonging to this <code>Module</code> type.</p>
) -><aclass="struct"href="../values/struct.FunctionValue.html"title="struct inkwell::values::FunctionValue">FunctionValue</a><'ctx></h4></section></summary><divclass="docblock"><p>Creates a function given its <code>name</code> and <code>ty</code>, adds it to the <code>Module</code>
and returns it.</p>
<p>An optional <code>linkage</code> can be specified, without which the default value
<code>Linkage::ExternalLinkage</code> will be used.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_context"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#244-246">source</a><h4class="code-header">pub fn <ahref="#method.get_context"class="fn">get_context</a>(&self) -><aclass="struct"href="../context/struct.ContextRef.html"title="struct inkwell::context::ContextRef">ContextRef</a><'ctx></h4></section></summary><divclass="docblock"><p>Gets the <code>Context</code> from which this <code>Module</code> originates.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_first_function"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#266-268">source</a><h4class="code-header">pub fn <ahref="#method.get_first_function"class="fn">get_first_function</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../values/struct.FunctionValue.html"title="struct inkwell::values::FunctionValue">FunctionValue</a><'ctx>></h4></section></summary><divclass="docblock"><p>Gets the first <code>FunctionValue</code> defined in this <code>Module</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_last_function"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#288-290">source</a><h4class="code-header">pub fn <ahref="#method.get_last_function"class="fn">get_last_function</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../values/struct.FunctionValue.html"title="struct inkwell::values::FunctionValue">FunctionValue</a><'ctx>></h4></section></summary><divclass="docblock"><p>Gets the last <code>FunctionValue</code> defined in this <code>Module</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_function"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#310-314">source</a><h4class="code-header">pub fn <ahref="#method.get_function"class="fn">get_function</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../values/struct.FunctionValue.html"title="struct inkwell::values::FunctionValue">FunctionValue</a><'ctx>></h4></section></summary><divclass="docblock"><p>Gets a <code>FunctionValue</code> defined in this <code>Module</code> by its name.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_functions"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#338-340">source</a><h4class="code-header">pub fn <ahref="#method.get_functions"class="fn">get_functions</a>(&self) -><aclass="struct"href="struct.FunctionIterator.html"title="struct inkwell::module::FunctionIterator">FunctionIterator</a><'ctx><ahref="#"class="tooltip"data-notable-ty="FunctionIterator<'ctx>">ⓘ</a></h4></section></summary><divclass="docblock"><p>An iterator over the functions in this <code>Module</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_struct_type"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#389-391">source</a><h4class="code-header">pub fn <ahref="#method.get_struct_type"class="fn">get_struct_type</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../types/struct.StructType.html"title="struct inkwell::types::StructType">StructType</a><'ctx>></h4></section></summary><divclass="docblock"><p>Gets a named <code>StructType</code> from this <code>Module</code>’s <code>Context</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_triple"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#412-414">source</a><h4class="code-header">pub fn <ahref="#method.set_triple"class="fn">set_triple</a>(&self, triple: &<aclass="struct"href="../targets/struct.TargetTriple.html"title="struct inkwell::targets::TargetTriple">TargetTriple</a>)</h4></section></summary><divclass="docblock"><p>Assigns a <code>TargetTriple</code> to this <code>Module</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_triple"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#436-441">source</a><h4class="code-header">pub fn <ahref="#method.get_triple"class="fn">get_triple</a>(&self) -><aclass="struct"href="../targets/struct.TargetTriple.html"title="struct inkwell::targets::TargetTriple">TargetTriple</a></h4></section></summary><divclass="docblock"><p>Gets the <code>TargetTriple</code> assigned to this <code>Module</code>. If none has been
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../execution_engine/struct.ExecutionEngine.html"title="struct inkwell::execution_engine::ExecutionEngine">ExecutionEngine</a><'ctx>, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>Creates an <code>ExecutionEngine</code> from this <code>Module</code>.</p>
Target::initialize_native(<spanclass="kw-2">&</span>InitializationConfig::default()).expect(<spanclass="string">"Failed to initialize native target"</span>);
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../execution_engine/struct.ExecutionEngine.html"title="struct inkwell::execution_engine::ExecutionEngine">ExecutionEngine</a><'ctx>, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>Creates an interpreter <code>ExecutionEngine</code> from this <code>Module</code>.</p>
Target::initialize_native(<spanclass="kw-2">&</span>InitializationConfig::default()).expect(<spanclass="string">"Failed to initialize native target"</span>);
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../execution_engine/struct.ExecutionEngine.html"title="struct inkwell::execution_engine::ExecutionEngine">ExecutionEngine</a><'ctx>, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>Creates a JIT <code>ExecutionEngine</code> from this <code>Module</code>.</p>
Target::initialize_native(<spanclass="kw-2">&</span>InitializationConfig::default()).expect(<spanclass="string">"Failed to initialize native target"</span>);
) -><aclass="struct"href="../values/struct.GlobalValue.html"title="struct inkwell::values::GlobalValue">GlobalValue</a><'ctx></h4></section></summary><divclass="docblock"><p>Creates a <code>GlobalValue</code> based on a type in an address space.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.write_bitcode_to_path"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#670-675">source</a><h4class="code-header">pub fn <ahref="#method.write_bitcode_to_path"class="fn">write_bitcode_to_path</a>(&self, path: &<aclass="struct"href="https://doc.rust-lang.org/1.77.1/std/path/struct.Path.html"title="struct std::path::Path">Path</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Writes a <code>Module</code> to a <code>Path</code>.</p>
) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p><code>write_bitcode_to_path</code> should be preferred over this method, as it does not work on all operating systems.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.write_bitcode_to_memory"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#720-724">source</a><h4class="code-header">pub fn <ahref="#method.write_bitcode_to_memory"class="fn">write_bitcode_to_memory</a>(&self) -><aclass="struct"href="../memory_buffer/struct.MemoryBuffer.html"title="struct inkwell::memory_buffer::MemoryBuffer">MemoryBuffer</a></h4></section></summary><divclass="docblock"><p>Writes this <code>Module</code> to a <code>MemoryBuffer</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.verify"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#731-744">source</a><h4class="code-header">pub fn <ahref="#method.verify"class="fn">verify</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.unit.html">()</a>, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>Ensures that the current <code>Module</code> is valid, and returns a <code>Result</code>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_data_layout"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#777-781">source</a><h4class="code-header">pub fn <ahref="#method.get_data_layout"class="fn">get_data_layout</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.1/core/cell/struct.Ref.html"title="struct core::cell::Ref">Ref</a><'_, <aclass="struct"href="../data_layout/struct.DataLayout.html"title="struct inkwell::data_layout::DataLayout">DataLayout</a>></h4></section></summary><divclass="docblock"><p>Gets a smart pointer to the <code>DataLayout</code> belonging to a particular <code>Module</code>.</p>
Target::initialize_native(<spanclass="kw-2">&</span>InitializationConfig::default()).expect(<spanclass="string">"Failed to initialize native target"</span>);
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_data_layout"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#806-812">source</a><h4class="code-header">pub fn <ahref="#method.set_data_layout"class="fn">set_data_layout</a>(&self, data_layout: &<aclass="struct"href="../data_layout/struct.DataLayout.html"title="struct inkwell::data_layout::DataLayout">DataLayout</a>)</h4></section></summary><divclass="docblock"><p>Sets the <code>DataLayout</code> for a particular <code>Module</code>.</p>
Target::initialize_native(<spanclass="kw-2">&</span>InitializationConfig::default()).expect(<spanclass="string">"Failed to initialize native target"</span>);
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.print_to_stderr"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#815-819">source</a><h4class="code-header">pub fn <ahref="#method.print_to_stderr"class="fn">print_to_stderr</a>(&self)</h4></section></summary><divclass="docblock"><p>Prints the content of the <code>Module</code> to stderr.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.print_to_string"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#822-824">source</a><h4class="code-header">pub fn <ahref="#method.print_to_string"class="fn">print_to_string</a>(&self) -><aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a></h4></section></summary><divclass="docblock"><p>Prints the content of the <code>Module</code> to an <code>LLVMString</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.print_to_file"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#827-849">source</a><h4class="code-header">pub fn <ahref="#method.print_to_file"class="fn">print_to_file</a><P: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/1.77.1/std/path/struct.Path.html"title="struct std::path::Path">Path</a>>>(&self, path: P) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.unit.html">()</a>, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>Prints the content of the <code>Module</code> to a file.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_string"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#852-854">source</a><h4class="code-header">pub fn <ahref="#method.to_string"class="fn">to_string</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.1/alloc/string/struct.String.html"title="struct alloc::string::String">String</a></h4></section></summary><divclass="docblock"><p>Prints the content of the <code>Module</code> to a <code>String</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_inline_assembly"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#857-872">source</a><h4class="code-header">pub fn <ahref="#method.set_inline_assembly"class="fn">set_inline_assembly</a>(&self, asm: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>)</h4></section></summary><divclass="docblock"><p>Sets the inline assembly for the <code>Module</code>.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.unit.html">()</a>, &'static <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>></h4></section></summary><divclass="docblock"><p>Appends a <code>MetaDataValue</code> to a global list indexed by a particular key.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_global_metadata_size"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#964-968">source</a><h4class="code-header">pub fn <ahref="#method.get_global_metadata_size"class="fn">get_global_metadata_size</a>(&self, key: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.u32.html">u32</a></h4></section></summary><divclass="docblock"><p>Obtains the number of <code>MetaDataValue</code>s indexed by a particular key.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_global_metadata"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1007-1021">source</a><h4class="code-header">pub fn <ahref="#method.get_global_metadata"class="fn">get_global_metadata</a>(&self, key: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>) -><aclass="struct"href="https://doc.rust-lang.org/1.77.1/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="struct"href="../values/struct.MetadataValue.html"title="struct inkwell::values::MetadataValue">MetadataValue</a><'ctx>></h4></section></summary><divclass="docblock"><p>Obtains the global <code>MetaDataValue</code> node indexed by key, which may contain 1 string or multiple values as its <code>get_node_values()</code></p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_first_global"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1041-1049">source</a><h4class="code-header">pub fn <ahref="#method.get_first_global"class="fn">get_first_global</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../values/struct.GlobalValue.html"title="struct inkwell::values::GlobalValue">GlobalValue</a><'ctx>></h4></section></summary><divclass="docblock"><p>Gets the first <code>GlobalValue</code> in a module.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_last_global"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1069-1077">source</a><h4class="code-header">pub fn <ahref="#method.get_last_global"class="fn">get_last_global</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../values/struct.GlobalValue.html"title="struct inkwell::values::GlobalValue">GlobalValue</a><'ctx>></h4></section></summary><divclass="docblock"><p>Gets the last <code>GlobalValue</code> in a module.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_global"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1097-1106">source</a><h4class="code-header">pub fn <ahref="#method.get_global"class="fn">get_global</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../values/struct.GlobalValue.html"title="struct inkwell::values::GlobalValue">GlobalValue</a><'ctx>></h4></section></summary><divclass="docblock"><p>Gets a named <code>GlobalValue</code> in a module.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_globals"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1109-1111">source</a><h4class="code-header">pub fn <ahref="#method.get_globals"class="fn">get_globals</a>(&self) -><aclass="struct"href="struct.GlobalIterator.html"title="struct inkwell::module::GlobalIterator">GlobalIterator</a><'ctx><ahref="#"class="tooltip"data-notable-ty="GlobalIterator<'ctx>">ⓘ</a></h4></section></summary><divclass="docblock"><p>An iterator over the globals in this <code>Module</code>.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>Creates a new <code>Module</code> from a <code>MemoryBuffer</code> with bitcode.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>A convenience function for creating a <code>Module</code> from a bitcode file for a given context.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_name"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1199-1204">source</a><h4class="code-header">pub fn <ahref="#method.get_name"class="fn">get_name</a>(&self) ->&<aclass="struct"href="https://doc.rust-lang.org/1.77.1/core/ffi/c_str/struct.CStr.html"title="struct core::ffi::c_str::CStr">CStr</a></h4></section></summary><divclass="docblock"><p>Gets the name of this <code>Module</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_name"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1220-1222">source</a><h4class="code-header">pub fn <ahref="#method.set_name"class="fn">set_name</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>)</h4></section></summary><divclass="docblock"><p>Assigns the name of this <code>Module</code>.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_source_file_name"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1242-1249">source</a><h4class="code-header">pub fn <ahref="#method.get_source_file_name"class="fn">get_source_file_name</a>(&self) ->&<aclass="struct"href="https://doc.rust-lang.org/1.77.1/core/ffi/c_str/struct.CStr.html"title="struct core::ffi::c_str::CStr">CStr</a></h4></section></summary><divclass="docblock"><p>Gets the source file name. It defaults to the module identifier but is separate from it.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.set_source_file_name"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1269-1279">source</a><h4class="code-header">pub fn <ahref="#method.set_source_file_name"class="fn">set_source_file_name</a>(&self, file_name: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>)</h4></section></summary><divclass="docblock"><p>Sets the source file name. It defaults to the module identifier but is separate from it.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.link_in_module"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1294-1324">source</a><h4class="code-header">pub fn <ahref="#method.link_in_module"class="fn">link_in_module</a>(&self, other: Self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.unit.html">()</a>, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>Links one module into another. This will merge two <code>Module</code>s into one.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_or_insert_comdat"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1329-1336">source</a><h4class="code-header">pub fn <ahref="#method.get_or_insert_comdat"class="fn">get_or_insert_comdat</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>) -><aclass="struct"href="../comdat/struct.Comdat.html"title="struct inkwell::comdat::Comdat">Comdat</a></h4></section></summary><divclass="docblock"><p>Gets the <code>Comdat</code> associated with a particular name. If it does not exist, it will be created.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_flag"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1343-1355">source</a><h4class="code-header">pub fn <ahref="#method.get_flag"class="fn">get_flag</a>(&self, key: &<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../values/struct.MetadataValue.html"title="struct inkwell::values::MetadataValue">MetadataValue</a><'ctx>></h4></section></summary><divclass="docblock"><p>Gets the <code>MetadataValue</code> flag associated with the key in this module, if any.
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.strip_debug_info"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1396-1400">source</a><h4class="code-header">pub fn <ahref="#method.strip_debug_info"class="fn">strip_debug_info</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Strips and debug info from the module, if it exists.</p>
</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.get_debug_metadata_version"class="method"><aclass="src rightside"href="../../src/inkwell/module.rs.html#1404-1408">source</a><h4class="code-header">pub fn <ahref="#method.get_debug_metadata_version"class="fn">get_debug_metadata_version</a>(&self) -><aclass="type"href="../../libc/unix/type.c_uint.html"title="type libc::unix::c_uint">c_uint</a></h4></section></summary><divclass="docblock"><p>Gets the version of debug metadata contained in this <code>Module</code>.</p>
) -> (<aclass="struct"href="../debug_info/struct.DebugInfoBuilder.html"title="struct inkwell::debug_info::DebugInfoBuilder">DebugInfoBuilder</a><'ctx>, <aclass="struct"href="../debug_info/struct.DICompileUnit.html"title="struct inkwell::debug_info::DICompileUnit">DICompileUnit</a><'ctx>)</h4></section></summary><divclass="docblock"><p>Creates a <code>DebugInfoBuilder</code> for this <code>Module</code>.</p>
) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.unit.html">()</a>, <aclass="struct"href="../support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></h4></section></summary><divclass="docblock"><p>Construct and run a set of passes over a module.
by <code>==</code>.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.ne"class="method trait-impl"><spanclass="rightside"><spanclass="since"title="Stable since Rust version 1.0.0">1.0.0</span> · <aclass="src"href="https://doc.rust-lang.org/1.77.1/src/core/cmp.rs.html#242">source</a></span><ahref="#method.ne"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/cmp/trait.PartialEq.html#method.ne"class="fn">ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&Rhs</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason.</div></details></div></details><detailsclass="toggle implementors-toggle"open><summary><sectionid="impl-PassManagerSubType-for-Module%3C'_%3E"class="impl"><aclass="src rightside"href="../../src/inkwell/passes.rs.html#235-245">source</a><ahref="#impl-PassManagerSubType-for-Module%3C'_%3E"class="anchor">§</a><h3class="code-header">impl <aclass="trait"href="../passes/trait.PassManagerSubType.html"title="trait inkwell::passes::PassManagerSubType">PassManagerSubType</a> for <aclass="struct"href="struct.Module.html"title="struct inkwell::module::Module">Module</a><'_></h3></section></summary><divclass="impl-items"><sectionid="associatedtype.Input"class="associatedtype trait-impl"><ahref="#associatedtype.Input"class="anchor">§</a><h4class="code-header">type <ahref="../passes/trait.PassManagerSubType.html#associatedtype.Input"class="associatedtype">Input</a> = <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.unit.html">()</a></h4></section><sectionid="method.create"class="method trait-impl"><aclass="src rightside"href="../../src/inkwell/passes.rs.html#238-240">source</a><ahref="#method.create"class="anchor">§</a><h4class="code-header">unsafe fn <ahref="../passes/trait.PassManagerSubType.html#tymethod.create"class="fn">create</a><I: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><Self::<aclass="associatedtype"href="../passes/trait.PassManagerSubType.html#associatedtype.Input"title="type inkwell::passes::PassManagerSubType::Input">Input</a>>>(_: I) -><aclass="type"href="../../llvm_sys/prelude/type.LLVMPassManagerRef.html"title="type llvm_sys::prelude::LLVMPassManagerRef">LLVMPassManagerRef</a></h4></section><sectionid="method.run_in_pass_manager"class="method trait-impl"><aclass="src rightside"href="../../src/inkwell/passes.rs.html#242-244">source</a><ahref="#method.run_in_pass_manager"class="anchor">§</a><h4class="code-header">unsafe fn <ahref="../passes/trait.PassManagerSubType.html#tymethod.run_in_pass_manager"class="fn">run_in_pass_manager</a>(&self, pass_manager: &<aclass="struct"href="../passes/struct.PassManager.html"title="struct inkwell::passes::PassManager">PassManager</a><Self>) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.bool.html">bool</a></h4></section></div></details><sectionid="impl-Eq-for-Module%3C'ctx%3E"class="impl"><aclass="src rightside"href="../../src/inkwell/module.rs.html#167">source</a><ahref="#impl-Eq-for-Module%3C'ctx%3E"class="anchor">§</a><h3class="code-header">impl<'ctx><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/cmp/trait.Eq.html"title="trait core::cmp::Eq">Eq</a> for <aclass="struct"href="struct.Module.html"title="struct inkwell::module::Module">Module</a><'ctx></h3></section><sectionid="impl-StructuralPartialEq-for-Module%3C'ctx%3E"class="impl"><aclass="src rightside"href="../../src/inkwell/module.rs.html#167">source</a><ahref="#impl-StructuralPartialEq-for-Module%3C'ctx%3E"class="anchor">§</a><h3class="code-header">impl<'ctx><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/marker/trait.StructuralPartialEq.html"title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <aclass="struct"href="struct.Module.html"title="struct inkwell::module::Module">Module</a><'ctx></h3></section></div><h2id="synthetic-implementations"class="section-header">Auto Trait Implementations<ahref="#synthetic-implementations"class="anchor">§</a></h2><divid="synthetic-implementations-list"><sectionid="impl-RefUnwindSafe-for-Module%3C'ctx%3E"class="impl"><ahref="#impl-RefUnwindSafe-for-Module%3C'ctx%3E"class="anchor">§</a><h3class="code-header">impl<'ctx> !<aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/panic/unwind_safe/trait.RefUnwindSafe.html"title="trait core::panic::unwind_safe::RefUnwindSafe">RefU
T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.type_id"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/any.rs.html#141">source</a><ahref="#method.type_id"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/any/trait.Any.html#tymethod.type_id"class="fn">type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/1.77.1/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></h4></section></summary><divclass='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/1.77.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Borrow%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/borrow.rs.html#208">source</a><ahref="#impl-Borrow%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/borrow.rs.html#210">source</a><ahref="#method.borrow"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/borrow/trait.Borrow.html#tymethod.borrow"class="fn">borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&T</a></h4></section></summary><divclass='docblock'>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.77.1/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-BorrowMut%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/borrow.rs.html#216">source</a><ahref="#impl-BorrowMut%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<divclass="where">where
T: ?<aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.borrow_mut"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/borrow.rs.html#217">source</a><ahref="#method.borrow_mut"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut"class="fn">borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut T</a></h4></section></summary><divclass='docblock'>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/1.77.1/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-From%3CT%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#764">source</a><ahref="#impl-From%3CT%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#767">source</a><ahref="#method.from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.From.html#tymethod.from"class="fn">from</a>(t: T) -> T</h4></section></summary><divclass="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-Into%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#747-749">source</a><ahref="#impl-Into%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T<divclass="where">where
<code><ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-ToOwned-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/alloc/borrow.rs.html#83-85">source</a><ahref="#impl-ToOwned-for-T"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T<divclass="where">where
T: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Owned"class="associatedtype trait-impl"><ahref="#associatedtype.Owned"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#associatedtype.Owned"class="associatedtype">Owned</a> = T</h4></section></summary><divclass='docblock'>The resulting type after obtaining ownership.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.to_owned"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/alloc/borrow.rs.html#88">source</a><ahref="#method.to_owned"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#tymethod.to_owned"class="fn">to_owned</a>(&self) -> T</h4></section></summary><divclass='docblock'>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.clone_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/alloc/borrow.rs.html#92">source</a><ahref="#method.clone_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#method.clone_into"class="fn">clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/1.77.1/std/primitive.reference.html">&mut T</a>)</h4></section></summary><divclass='docblock'>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/1.77.1/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#804-806">source</a><ahref="#impl-TryFrom%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#811">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-T"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#789-791">source</a><ahref="#impl-TryInto%3CU%3E-for-T"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<divclass="where">where
U: <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/1.77.1/src/core/convert/mod.rs.html#796">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/1.77.1/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/1.77.1/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details></div><scripttype="text/json"id="notable-traits-data">{"FunctionIterator<'ctx>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.FunctionIterator.html\" title=\"struct inkwell::module::FunctionIterator\">FunctionIterator</a><'ctx></code></h3><pre><code><div class=\"where\">impl<'ctx> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.1/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.FunctionIterator.html\" title=\"struct inkwell::module::FunctionIterator\">FunctionIterator</a><'ctx></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.77.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"../values/struct.FunctionValue.html\" title=\"struct inkwell::values::FunctionValue\">FunctionValue</a><'ctx>;</div>","GlobalIterator<'ctx>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.GlobalIterator.html\" title=\"struct inkwell::module::GlobalIterator\">GlobalIterator</a><'ctx></code></h3><pre><code><div class=\"where\">impl<'ctx> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.77.1/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.GlobalIterator.html\" title=\"struct inkwell::module::GlobalIterator\">GlobalIterator</a><'ctx></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.77.1/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"../values/struct.GlobalValue.html\" title=\"struct inkwell::values::GlobalValue\">GlobalValue</a><'ctx>;</div>"}</script></section></div></main></body></html>