<!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="API documentation for the Rust `Module` struct in crate `inkwell`."><metaname="keywords"content="rust, rustlang, rust-lang, Module"><title>inkwell::module::Module - Rust</title><linkrel="stylesheet"type="text/css"href="../../normalize.css"><linkrel="stylesheet"type="text/css"href="../../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../../dark.css"><linkrel="stylesheet"type="text/css"href="../../light.css"id="themeStyle"><scriptsrc="../../storage.js"></script><noscript><linkrel="stylesheet"href="../../noscript.css"></noscript><linkrel="shortcut icon"href="../../favicon.ico"><styletype="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><bodyclass="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><ahref='../../inkwell/index.html'><divclass='logo-container'><imgsrc='../../rust-logo.png'alt='logo'></div></a><pclass='location'>Struct Module</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#methods">Methods</a><divclass="sidebar-links"><ahref="#method.add_basic_value_flag">add_basic_value_flag</a><ahref="#method.add_function">add_function</a><ahref="#method.add_global">add_global</a><ahref="#method.add_global_metadata">add_global_metadata</a><ahref="#method.add_metadata_flag">add_metadata_flag</a><ahref="#method.create">create</a><ahref="#method.create_execution_engine">create_execution_engine</a><ahref="#method.create_interpreter_execution_engine">create_interpreter_execution_engine</a><ahref="#method.create_jit_execution_engine">create_jit_execution_engine</a><ahref="#method.get_context">get_context</a><ahref="#method.get_data_layout">get_data_layout</a><ahref="#method.get_first_function">get_first_function</a><ahref="#method.get_first_global">get_first_global</a><ahref="#method.get_flag">get_flag</a><ahref="#method.get_function">get_function</a><ahref="#method.get_global">get_global</a><ahref="#method.get_global_metadata">get_global_metadata</a><ahref="#method.get_global_metadata_size">get_global_metadata_size</a><ahref="#method.get_last_function">get_last_function</a><ahref="#method.get_last_global">get_last_global</a><ahref="#method.get_name">get_name</a><ahref="#method.get_or_insert_comdat">get_or_insert_comdat</a><ahref="#method.get_source_file_name">get_source_file_name</a><ahref="#method.get_target">get_target</a><ahref="#method.get_type">get_type</a><ahref="#method.link_in_module">link_in_module</a><ahref="#method.parse_bitcode_from_buffer">parse_bitcode_from_buffer</a><ahref="#method.parse_bitcode_from_buffer_in_context">parse_bitcode_from_buffer_in_context</a><ahref="#method.parse_bitcode_from_path">parse_bitcode_from_path</a><ahref="#method.parse_bitcode_from_path_in_context">parse_bitcode_from_path_in_context</a><ahref="#method.print_to_file">print_to_file</a><ahref="#method.print_to_stderr">print_to_stderr</a><ahref="#method.print_to_string">print_to_string</a><ahref="#method.set_data_layout">set_data_layout</a><ahref="#method.set_inline_assembly">set_inline_assembly</a><ahref="#method.set_name">set_name</a><ahref="#method.set_source_file_name">set_source_file_name</a><ahref="#method.set_target">set_target</a><ahref="#method.verify">verify</a><ahref="#method.write_bitcode_to_file">write_bitcode_to_file</a><ahref="#method.write_bitcode_to_memory">write_bitcode_to_memory</a><ahref="#method.write_bitcode_to_path">write_bitcode_to_path</a></div><aclass="sidebar-title"href="#implementations">Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-Clone">Clone</a><ahref="#impl-Debug">Debug</a><ahref="#impl-Drop">Drop</a><ahref="#impl-Eq">Eq</a><ahref="#impl-PartialEq%3CModule%3E
The underlying module will be disposed when dropping this object.</p>
</div><h2id='methods'class='small-section-header'>Methods<ahref='#methods'class='anchor'></a></h2><h3id='impl'class='impl'><codeclass='in-band'>impl <aclass="struct"href="../../inkwell/module/struct.Module.html"title="struct inkwell::module::Module">Module</a></code><ahref='#impl'class='anchor'></a><aclass='srclink'href='../../src/inkwell/module.rs.html#141-1405'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.create'class="method"><codeid='create.v'>pub fn <ahref='#method.create'class='fnname'>create</a>(name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> Self</code><aclass='srclink'href='../../src/inkwell/module.rs.html#167-175'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a named <code>Module</code>. Will be automatically assigned the global context.</p>
<p>To use your own <code>Context</code>, see <ahref="../context/struct.Context.html#method.create_module">inkwell::context::create_module()</a></p>
</div><h4id='method.add_function'class="method"><codeid='add_function.v'>pub fn <ahref='#method.add_function'class='fnname'>add_function</a>(<br> &self, <br> name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> ty: <aclass="struct"href="../../inkwell/types/struct.FunctionType.html"title="struct inkwell::types::FunctionType">FunctionType</a>, <br> linkage: <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="../../inkwell/module/enum.Linkage.html"title="enum inkwell::module::Linkage">Linkage</a>><br>) -><aclass="struct"href="../../inkwell/values/struct.FunctionValue.html"title="struct inkwell::values::FunctionValue">FunctionValue</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#197-211'title='goto source code'>[src]</a></h4><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><h4id='method.get_context'class="method"><codeid='get_context.v'>pub fn <ahref='#method.get_context'class='fnname'>get_context</a>(&self) -><aclass="struct"href="../../inkwell/context/struct.ContextRef.html"title="struct inkwell::context::ContextRef">ContextRef</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#231-238'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the <code>Context</code> from which this <code>Module</code> originates.</p>
</div><h4id='method.get_first_function'class="method"><codeid='get_first_function.v'>pub fn <ahref='#method.get_first_function'class='fnname'>get_first_function</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../inkwell/values/struct.FunctionValue.html"title="struct inkwell::values::FunctionValue">FunctionValue</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#258-264'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the first <code>FunctionValue</code> defined in this <code>Module</code>.</p>
</div><h4id='method.get_last_function'class="method"><codeid='get_last_function.v'>pub fn <ahref='#method.get_last_function'class='fnname'>get_last_function</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../inkwell/values/struct.FunctionValue.html"title="struct inkwell::values::FunctionValue">FunctionValue</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#284-290'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the last <code>FunctionValue</code> defined in this <code>Module</code>.</p>
</div><h4id='method.get_function'class="method"><codeid='get_function.v'>pub fn <ahref='#method.get_function'class='fnname'>get_function</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../inkwell/values/struct.FunctionValue.html"title="struct inkwell::values::FunctionValue">FunctionValue</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#310-318'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets a <code>FunctionValue</code> defined in this <code>Module</code> by its name.</p>
</div><h4id='method.get_type'class="method"><codeid='get_type.v'>pub fn <ahref='#method.get_type'class='fnname'>get_type</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="../../inkwell/types/enum.BasicTypeEnum.html"title="enum inkwell::types::BasicTypeEnum">BasicTypeEnum</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#337-349'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets a <code>BasicTypeEnum</code> of a named type in a <code>Module</code>.</p>
</div><h4id='method.set_target'class="method"><codeid='set_target.v'>pub fn <ahref='#method.set_target'class='fnname'>set_target</a>(&self, target: &<aclass="struct"href="../../inkwell/targets/struct.Target.html"title="struct inkwell::targets::Target">Target</a>)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#371-375'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Sets a <code>Target</code> to this <code>Module</code>.</p>
</div><h4id='method.get_target'class="method"><codeid='get_target.v'>pub fn <ahref='#method.get_target'class='fnname'>get_target</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../inkwell/targets/struct.Target.html"title="struct inkwell::targets::Target">Target</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#397-404'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the <code>Target</code> assigned to this <code>Module</code>, if any.</p>
</div><h4id='method.create_execution_engine'class="method"><codeid='create_execution_engine.v'>pub fn <ahref='#method.create_execution_engine'class='fnname'>create_execution_engine</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../inkwell/execution_engine/struct.ExecutionEngine.html"title="struct inkwell::execution_engine::ExecutionEngine">ExecutionEngine</a>, <aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#423-452'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates an <code>ExecutionEngine</code> from this <code>Module</code>.</p>
<spanclass="ident">Target</span>::<spanclass="ident">initialize_native</span>(<spanclass="kw-2">&</span><spanclass="ident">InitializationConfig</span>::<spanclass="ident">default</span>()).<spanclass="ident">expect</span>(<spanclass="string">"Failed to initialize native target"</span>);
<spanclass="ident">Target</span>::<spanclass="ident">initialize_native</span>(<spanclass="kw-2">&</span><spanclass="ident">InitializationConfig</span>::<spanclass="ident">default</span>()).<spanclass="ident">expect</span>(<spanclass="string">"Failed to initialize native target"</span>);
<spanclass="ident">Target</span>::<spanclass="ident">initialize_native</span>(<spanclass="kw-2">&</span><spanclass="ident">InitializationConfig</span>::<spanclass="ident">default</span>()).<spanclass="ident">expect</span>(<spanclass="string">"Failed to initialize native target"</span>);
</div><h4id='method.add_global'class="method"><codeid='add_global.v'>pub fn <ahref='#method.add_global'class='fnname'>add_global</a><T: <aclass="trait"href="../../inkwell/types/trait.BasicType.html"title="trait inkwell::types::BasicType">BasicType</a>>(<br> &self, <br> type_: T, <br> address_space: <aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="../../inkwell/enum.AddressSpace.html"title="enum inkwell::AddressSpace">AddressSpace</a>>, <br> name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><br>) -><aclass="struct"href="../../inkwell/values/struct.GlobalValue.html"title="struct inkwell::values::GlobalValue">GlobalValue</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#569-580'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a <code>GlobalValue</code> based on a type in an address space.</p>
</div><h4id='method.write_bitcode_to_path'class="method"><codeid='write_bitcode_to_path.v'>pub fn <ahref='#method.write_bitcode_to_path'class='fnname'>write_bitcode_to_path</a>(&self, path: &<aclass="struct"href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html"title="struct std::path::Path">Path</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#601-608'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Writes a <code>Module</code> to a <code>Path</code>.</p>
</div><h4id='method.write_bitcode_to_file'class="method"><codeid='write_bitcode_to_file.v'>pub fn <ahref='#method.write_bitcode_to_file'class='fnname'>write_bitcode_to_file</a>(<br> &self, <br> file: &<aclass="struct"href="https://doc.rust-lang.org/nightly/std/fs/struct.File.html"title="struct std::fs::File">File</a>, <br> should_close: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br> unbuffered: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#612-626'title='goto source code'>[src]</a></h4><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><h4id='method.write_bitcode_to_memory'class="method"><codeid='write_bitcode_to_memory.v'>pub fn <ahref='#method.write_bitcode_to_memory'class='fnname'>write_bitcode_to_memory</a>(&self) -><aclass="struct"href="../../inkwell/memory_buffer/struct.MemoryBuffer.html"title="struct inkwell::memory_buffer::MemoryBuffer">MemoryBuffer</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#648-654'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Writes this <code>Module</code> to a <code>MemoryBuffer</code>.</p>
</div><h4id='method.verify'class="method"><codeid='verify.v'>pub fn <ahref='#method.verify'class='fnname'>verify</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#661-675'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Ensures that the current <code>Module</code> is valid, and returns a <code>Result</code>
that describes whether or not it is, returning a LLVM allocated string on error.</p>
</div><h4id='method.get_data_layout'class="method"><codeid='get_data_layout.v'>pub fn <ahref='#method.get_data_layout'class='fnname'>get_data_layout</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/nightly/core/cell/struct.Ref.html"title="struct core::cell::Ref">Ref</a><<aclass="struct"href="../../inkwell/data_layout/struct.DataLayout.html"title="struct inkwell::data_layout::DataLayout">DataLayout</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#715-717'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets a smart pointer to the <code>DataLayout</code> belonging to a particular <code>Module</code>.</p>
<spanclass="ident">Target</span>::<spanclass="ident">initialize_native</span>(<spanclass="kw-2">&</span><spanclass="ident">InitializationConfig</span>::<spanclass="ident">default</span>()).<spanclass="ident">expect</span>(<spanclass="string">"Failed to initialize native target"</span>);
</div><h4id='method.set_data_layout'class="method"><codeid='set_data_layout.v'>pub fn <ahref='#method.set_data_layout'class='fnname'>set_data_layout</a>(&self, data_layout: &<aclass="struct"href="../../inkwell/data_layout/struct.DataLayout.html"title="struct inkwell::data_layout::DataLayout">DataLayout</a>)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#742-748'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Sets the <code>DataLayout</code> for a particular <code>Module</code>.</p>
<spanclass="ident">Target</span>::<spanclass="ident">initialize_native</span>(<spanclass="kw-2">&</span><spanclass="ident">InitializationConfig</span>::<spanclass="ident">default</span>()).<spanclass="ident">expect</span>(<spanclass="string">"Failed to initialize native target"</span>);
</div><h4id='method.print_to_stderr'class="method"><codeid='print_to_stderr.v'>pub fn <ahref='#method.print_to_stderr'class='fnname'>print_to_stderr</a>(&self)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#751-755'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Prints the content of the <code>Module</code> to stderr.</p>
</div><h4id='method.print_to_string'class="method"><codeid='print_to_string.v'>pub fn <ahref='#method.print_to_string'class='fnname'>print_to_string</a>(&self) -><aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#758-764'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Prints the content of the <code>Module</code> to a string.</p>
</div><h4id='method.print_to_file'class="method"><codeid='print_to_file.v'>pub fn <ahref='#method.print_to_file'class='fnname'>print_to_file</a><P: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html"title="struct std::path::Path">Path</a>>>(&self, path: P) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#767-780'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Prints the content of the <code>Module</code> to a file.</p>
</div><h4id='method.set_inline_assembly'class="method"><codeid='set_inline_assembly.v'>pub fn <ahref='#method.set_inline_assembly'class='fnname'>set_inline_assembly</a>(&self, asm: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#783-804'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Sets the inline assembly for the <code>Module</code>.</p>
</div><h4id='method.add_global_metadata'class="method"><codeid='add_global_metadata.v'>pub fn <ahref='#method.add_global_metadata'class='fnname'>add_global_metadata</a>(&self, key: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, metadata: &<aclass="struct"href="../../inkwell/values/struct.MetadataValue.html"title="struct inkwell::values::MetadataValue">MetadataValue</a>)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#847-853'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Appends a <code>MetaDataValue</code> to a global list indexed by a particular key.</p>
<spanclass="kw">let</span><spanclass="ident">md_string</span><spanclass="op">=</span><spanclass="ident">MetadataValue</span>::<spanclass="ident">create_string</span>(<spanclass="string">"lots of metadata here"</span>);
</div><h4id='method.get_global_metadata_size'class="method"><codeid='get_global_metadata_size.v'>pub fn <ahref='#method.get_global_metadata_size'class='fnname'>get_global_metadata_size</a>(&self, key: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#893-899'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Obtains the number of <code>MetaDataValue</code>s indexed by a particular key.</p>
<spanclass="kw">let</span><spanclass="ident">md_string</span><spanclass="op">=</span><spanclass="ident">MetadataValue</span>::<spanclass="ident">create_string</span>(<spanclass="string">"lots of metadata here"</span>);
</div><h4id='method.get_global_metadata'class="method"><codeid='get_global_metadata.v'>pub fn <ahref='#method.get_global_metadata'class='fnname'>get_global_metadata</a>(&self, key: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="struct"href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html"title="struct alloc::vec::Vec">Vec</a><<aclass="struct"href="../../inkwell/values/struct.MetadataValue.html"title="struct inkwell::values::MetadataValue">MetadataValue</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#939-955'title='goto source code'>[src]</a></h4><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>
<spanclass="kw">let</span><spanclass="ident">md_string</span><spanclass="op">=</span><spanclass="ident">MetadataValue</span>::<spanclass="ident">create_string</span>(<spanclass="string">"lots of metadata here"</span>);
</div><h4id='method.get_first_global'class="method"><codeid='get_first_global.v'>pub fn <ahref='#method.get_first_global'class='fnname'>get_first_global</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../inkwell/values/struct.GlobalValue.html"title="struct inkwell::values::GlobalValue">GlobalValue</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#975-985'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the first <code>GlobalValue</code> in a module.</p>
</div><h4id='method.get_last_global'class="method"><codeid='get_last_global.v'>pub fn <ahref='#method.get_last_global'class='fnname'>get_last_global</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../inkwell/values/struct.GlobalValue.html"title="struct inkwell::values::GlobalValue">GlobalValue</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1005-1015'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the last <code>GlobalValue</code> in a module.</p>
</div><h4id='method.get_global'class="method"><codeid='get_global.v'>pub fn <ahref='#method.get_global'class='fnname'>get_global</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../inkwell/values/struct.GlobalValue.html"title="struct inkwell::values::GlobalValue">GlobalValue</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1035-1046'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets a named <code>GlobalValue</code> in a module.</p>
</div><h4id='method.parse_bitcode_from_buffer'class="method"><codeid='parse_bitcode_from_buffer.v'>pub fn <ahref='#method.parse_bitcode_from_buffer'class='fnname'>parse_bitcode_from_buffer</a>(<br> buffer: &<aclass="struct"href="../../inkwell/memory_buffer/struct.MemoryBuffer.html"title="struct inkwell::memory_buffer::MemoryBuffer">MemoryBuffer</a><br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, <aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1065-1082'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a new <code>Module</code> from a <code>MemoryBuffer</code>.</p>
</div><h4id='method.parse_bitcode_from_buffer_in_context'class="method"><codeid='parse_bitcode_from_buffer_in_context.v'>pub fn <ahref='#method.parse_bitcode_from_buffer_in_context'class='fnname'>parse_bitcode_from_buffer_in_context</a>(<br> buffer: &<aclass="struct"href="../../inkwell/memory_buffer/struct.MemoryBuffer.html"title="struct inkwell::memory_buffer::MemoryBuffer">MemoryBuffer</a>, <br> context: &<aclass="struct"href="../../inkwell/context/struct.Context.html"title="struct inkwell::context::Context">Context</a><br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, <aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1102-1119'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a new <code>Module</code> from a <code>MemoryBuffer</code>.</p>
</div><h4id='method.parse_bitcode_from_path'class="method"><codeid='parse_bitcode_from_path.v'>pub fn <ahref='#method.parse_bitcode_from_path'class='fnname'>parse_bitcode_from_path</a><P: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html"title="struct std::path::Path">Path</a>>>(<br> path: P<br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, <aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1138-1142'title='goto source code'>[src]</a></h4><divclass='docblock'><p>A convenience function for creating a <code>Module</code> from a file.</p>
</div><h4id='method.parse_bitcode_from_path_in_context'class="method"><codeid='parse_bitcode_from_path_in_context.v'>pub fn <ahref='#method.parse_bitcode_from_path_in_context'class='fnname'>parse_bitcode_from_path_in_context</a><P: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html"title="trait core::convert::AsRef">AsRef</a><<aclass="struct"href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html"title="struct std::path::Path">Path</a>>>(<br> path: P, <br> context: &<aclass="struct"href="../../inkwell/context/struct.Context.html"title="struct inkwell::context::Context">Context</a><br>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><Self, <aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1162-1166'title='goto source code'>[src]</a></h4><divclass='docblock'><p>A convenience function for creating a <code>Module</code> from a file for a given context.</p>
</div><h4id='method.get_name'class="method"><codeid='get_name.v'>pub fn <ahref='#method.get_name'class='fnname'>get_name</a>(&self) ->&<aclass="struct"href="https://doc.rust-lang.org/nightly/std/ffi/c_str/struct.CStr.html"title="struct std::ffi::c_str::CStr">CStr</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1182-1191'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the name of this <code>Module</code>.</p>
</div><h4id='method.set_name'class="method"><codeid='set_name.v'>pub fn <ahref='#method.set_name'class='fnname'>set_name</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#1209-1213'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Assigns the name of this <code>Module</code>.</p>
</div><h4id='method.get_source_file_name'class="method"><codeid='get_source_file_name.v'>pub fn <ahref='#method.get_source_file_name'class='fnname'>get_source_file_name</a>(&self) ->&<aclass="struct"href="https://doc.rust-lang.org/nightly/std/ffi/c_str/struct.CStr.html"title="struct std::ffi::c_str::CStr">CStr</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1234-1245'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the source file name. It defaults to the module identifier but is separate from it.</p>
</div><h4id='method.set_source_file_name'class="method"><codeid='set_source_file_name.v'>pub fn <ahref='#method.set_source_file_name'class='fnname'>set_source_file_name</a>(&self, file_name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#1266-1272'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Sets the source file name. It defaults to the module identifier but is separate from it.</p>
</div><h4id='method.link_in_module'class="method"><codeid='link_in_module.v'>pub fn <ahref='#method.link_in_module'class='fnname'>link_in_module</a>(&self, other: Self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <aclass="struct"href="../../inkwell/support/struct.LLVMString.html"title="struct inkwell::support::LLVMString">LLVMString</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1287-1337'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Links one module into another. This will merge two <code>Module</code>s into one.</p>
</div><h4id='method.get_or_insert_comdat'class="method"><codeid='get_or_insert_comdat.v'>pub fn <ahref='#method.get_or_insert_comdat'class='fnname'>get_or_insert_comdat</a>(&self, name: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="struct"href="../../inkwell/comdat/struct.Comdat.html"title="struct inkwell::comdat::Comdat">Comdat</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1342-1351'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the <code>Comdat</code> associated with a particular name. If it does not exist, it will be created.
A new <code>Comdat</code> defaults to a kind of <code>ComdatSelectionKind::Any</code>.</p>
</div><h4id='method.get_flag'class="method"><codeid='get_flag.v'>pub fn <ahref='#method.get_flag'class='fnname'>get_flag</a>(&self, key: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="../../inkwell/values/struct.MetadataValue.html"title="struct inkwell::values::MetadataValue">MetadataValue</a>></code><aclass='srclink'href='../../src/inkwell/module.rs.html#1358-1377'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Gets the <code>MetadataValue</code> flag associated with the key in this module, if any.
If a <code>BasicValue</code> was used to create this flag, it will be wrapped in a <code>MetadataValue</code>
when returned from this function.</p>
</div><h4id='method.add_metadata_flag'class="method"><codeid='add_metadata_flag.v'>pub fn <ahref='#method.add_metadata_flag'class='fnname'>add_metadata_flag</a>(<br> &self, <br> key: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> behavior: <aclass="enum"href="../../inkwell/module/enum.FlagBehavior.html"title="enum inkwell::module::FlagBehavior">FlagBehavior</a>, <br> flag: <aclass="struct"href="../../inkwell/values/struct.MetadataValue.html"title="struct inkwell::values::MetadataValue">MetadataValue</a><br>)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#1382-1388'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Append a <code>MetadataValue</code> as a module wide flag. Note that using the same key twice
will likely invalidate the module.</p>
</div><h4id='method.add_basic_value_flag'class="method"><codeid='add_basic_value_flag.v'>pub fn <ahref='#method.add_basic_value_flag'class='fnname'>add_basic_value_flag</a><BV: <aclass="trait"href="../../inkwell/values/trait.BasicValue.html"title="trait inkwell::values::BasicValue">BasicValue</a>>(<br> &self, <br> key: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br> behavior: <aclass="enum"href="../../inkwell/module/enum.FlagBehavior.html"title="enum inkwell::module::FlagBehavior">FlagBehavior</a>, <br> flag: BV<br>)</code><aclass='srclink'href='../../src/inkwell/module.rs.html#1394-1404'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Append a <code>BasicValue</code> as a module wide flag. Note that using the same key twice
</div><h4id='method.clone_from'class="method hidden"><codeid='clone_from.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from'class='fnname'>clone_from</a>(&mut self, source: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code><spanclass='since'title='Stable since Rust version 1.0.0'>1.0.0</span><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#131-133'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <ahref="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3id='impl-PartialEq%3CModule%3E'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="../../inkwell/module/struct.Module.html"title="struct inkwell::module::Module">Module</a>> for <aclass="struct"href="../../inkwell/module/struct.Module.html"title="struct inkwell::module::Module">Module</a></code><ahref='#impl-PartialEq%3CModule%3E'class='anchor'></a><aclass='srclink'href='../../src/inkwell/module.rs.html#133'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.eq'class="method hidden"><codeid='eq.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq'class='fnname'>eq</a>(&self, other: &<aclass="struct"href="../../inkwell/module/struct.Module.html"title="struct inkwell::module::Module">Module</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#133'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div></div><h3id='impl-Debug'class='impl'><codeclass='in-band'>impl <aclass="trait"href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="../../inkwell/module/struct.Module.html"title="struct inkwell::module::Module">Module</a></code><ahref='#impl-Debug'class='anchor'></a><aclass='srclink'href='../../src/inkwell/module.rs.html#133'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.fmt'class="method hidden"><codeid='fmt.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt'class='fnname'>fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a>) -><aclass="type"href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html"title="type core::fmt::Result">Result</a></code><aclass='srclink'href='../../src/inkwell/module.rs.html#133'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3id='impl-ToOwned'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html"title="trait alloc::borrow::ToOwned">ToOwned</a> for T <spanclass="where fmt-newline">where<br> T: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a>, </span></code><ahref='#impl-ToOwned'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#81-92'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Owned'class="type"><codeid='Owned.t'>type <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#associatedtype.Owned'class="type">Owned</a> = T</code></h4><divclass='docblock'><p>The resulting type after obtaining ownership.</p>
</div><h4id='method.to_owned'class="method hidden"><codeid='to_owned.v'>fn <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned'class='fnname'>to_owned</a>(&self) -> T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#85-87'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Creates owned data from borrowed data, usually by cloning. <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></p>
</div><h4id='method.clone_into'class="method hidden"><codeid='clone_into.v'>fn <ahref='https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into'class='fnname'>clone_into</a>(&self, target: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T)</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/alloc/borrow.rs.html#89-91'title='goto source code'>[src]</a></h4><divclass='stability hidden'><divclass='stab unstable'><details><summary><spanclass='emoji'>🔬</span> This is a nightly-only experimental API. (<code>toowned_clone_into</code>)</summary><p>recently added</p>
</details></div></div><divclass='docblock hidden'><p>Uses borrowed data to replace owned data, usually by cloning. <ahref="https://doc.rust-lang.org/nightly/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></p>
</div></div><h3id='impl-TryFrom%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></code><ahref='#impl-TryFrom%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#571-577'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error'class="type"><codeid='Error.t'>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error'class="type">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_from'class="method hidden"><codeid='try_from.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from'class='fnname'>try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#574-576'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-TryInto%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><ahref='#impl-TryInto%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#559-566'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error-1'class="type"><codeid='Error.t-1'>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error'class="type">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="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><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_into'class="method hidden"><codeid='try_into.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into'class='fnname'>try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#563-565'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-BorrowMut%3CT%3E'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-BorrowMut%3CT%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow_mut'class="method hidden"><codeid='borrow_mut.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut'class='fnname'>borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3id='impl-Borrow%3CT%3E'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-Borrow%3CT%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow'class="method hidden"><codeid='borrow.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow'class='fnname'>borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3id='impl-Any'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> for T <spanclass="where fmt-newline">where<br> T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-Any'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.type_id'class="method hidden"><codeid='type_id.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id'class='fnname'>type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div></div></section><sectionid="search"class="content hidden"></section><sectionclass="footer"></section><asideid="help"class="hidden"><div><h1class="hidden">Help</h1><divclass="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>⏎</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><divclass="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><scriptsrc="../../aliases.js"></script><scriptsrc="../../main.js"></script><scriptdefersrc="../../search-index.js"></script></body></html>