mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-25 02:12:13 +00:00
132 lines
54 KiB
HTML
132 lines
54 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `FunctionBuilder` struct in crate `wasmer_clif_fork_frontend`."><meta name="keywords" content="rust, rustlang, rust-lang, FunctionBuilder"><title>wasmer_clif_fork_frontend::FunctionBuilder - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../wasmer_clif_fork_frontend/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Struct FunctionBuilder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.func">func</a></div><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.append_ebb_param">append_ebb_param</a><a href="#method.append_ebb_params_for_function_params">append_ebb_params_for_function_params</a><a href="#method.append_ebb_params_for_function_returns">append_ebb_params_for_function_returns</a><a href="#method.call_memcpy">call_memcpy</a><a href="#method.call_memmove">call_memmove</a><a href="#method.call_memset">call_memset</a><a href="#method.change_jump_destination">change_jump_destination</a><a href="#method.create_ebb">create_ebb</a><a href="#method.create_global_value">create_global_value</a><a href="#method.create_heap">create_heap</a><a href="#method.create_jump_table">create_jump_table</a><a href="#method.create_stack_slot">create_stack_slot</a><a href="#method.cursor">cursor</a><a href="#method.declare_var">declare_var</a><a href="#method.def_var">def_var</a><a href="#method.display">display</a><a href="#method.ebb_params">ebb_params</a><a href="#method.emit_small_memcpy">emit_small_memcpy</a><a href="#method.emit_small_memmove">emit_small_memmove</a><a href="#method.emit_small_memset">emit_small_memset</a><a href="#method.ensure_inserted_ebb">ensure_inserted_ebb</a><a href="#method.finalize">finalize</a><a href="#method.import_function">import_function</a><a href="#method.import_signature">import_signature</a><a href="#method.ins">ins</a><a href="#method.inst_results">inst_results</a><a href="#method.is_filled">is_filled</a><a href="#method.is_pristine">is_pristine</a><a href="#method.is_unreachable">is_unreachable</a><a href="#method.new">new</a><a href="#method.seal_all_blocks">seal_all_blocks</a><a href="#method.seal_block">seal_block</a><a href="#method.set_srcloc">set_srcloc</a><a href="#method.set_val_label">set_val_label</a><a href="#method.signature">signature</a><a href="#method.switch_to_block">switch_to_block</a><a href="#method.use_var">use_var</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a></div></div><p class='location'><a href='index.html'>wasmer_clif_fork_frontend</a></p><script>window.sidebarCurrent = {name: 'FunctionBuilder', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#30-40' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='index.html'>wasmer_clif_fork_frontend</a>::<wbr><a class="struct" href=''>FunctionBuilder</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>pub struct FunctionBuilder<'a> {
|
||
pub func: &'a mut <a class="struct" href="../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>,
|
||
// some fields omitted
|
||
}</pre></div><div class='docblock'><p>Temporary object used to build a single Cranelift IR <code>Function</code>.</p>
|
||
</div><h2 id='fields' class='fields small-section-header'>
|
||
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.func" class="structfield small-section-header"><a href="#structfield.func" class="anchor field"></a><code id="func.v">func: &'a mut <a class="struct" href="../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a></code></span><div class='docblock'><p>The function currently being built.
|
||
This field is public so the function can be re-borrowed.</p>
|
||
</div><h2 id='methods' class='small-section-header'>Methods<a href='#methods' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl<'a> <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html" title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#218-493' title='goto source code'>[src]</a></h3><div class='docblock'><p>This module allows you to create a function in Cranelift IR in a straightforward way, hiding
|
||
all the complexity of its internal representation.</p>
|
||
<p>The module is parametrized by one type which is the representation of variables in your
|
||
origin language. It offers a way to conveniently append instruction to your program flow.
|
||
You are responsible to split your instruction flow into extended blocks (declared with
|
||
<code>create_ebb</code>) whose properties are:</p>
|
||
<ul>
|
||
<li>branch and jump instructions can only point at the top of extended blocks;</li>
|
||
<li>the last instruction of each block is a terminator instruction which has no natural successor,
|
||
and those instructions can only appear at the end of extended blocks.</li>
|
||
</ul>
|
||
<p>The parameters of Cranelift IR instructions are Cranelift IR values, which can only be created
|
||
as results of other Cranelift IR instructions. To be able to create variables redefined multiple
|
||
times in your program, use the <code>def_var</code> and <code>use_var</code> command, that will maintain the
|
||
correspondence between your variables and Cranelift IR SSA values.</p>
|
||
<p>The first block for which you call <code>switch_to_block</code> will be assumed to be the beginning of
|
||
the function.</p>
|
||
<p>At creation, a <code>FunctionBuilder</code> instance borrows an already allocated <code>Function</code> which it
|
||
modifies with the information stored in the mutable borrowed
|
||
<a href="struct.FunctionBuilderContext.html"><code>FunctionBuilderContext</code></a>. The function passed in
|
||
argument should be newly created with
|
||
<a href="../function/struct.Function.html"><code>Function::with_name_signature()</code></a>, whereas the
|
||
<code>FunctionBuilderContext</code> can be kept as is between two function translations.</p>
|
||
<h1 id="errors" class="section-header"><a href="#errors">Errors</a></h1>
|
||
<p>The functions below will panic in debug mode whenever you try to modify the Cranelift IR
|
||
function in a way that violate the coherence of the code. For instance: switching to a new
|
||
<code>Ebb</code> when you haven't filled the current one with a terminator instruction, inserting a
|
||
return instruction with arguments that don't match the function's signature.</p>
|
||
</div><div class='impl-items'><h4 id='method.new' class="method"><code id='new.v'>pub fn <a href='#method.new' class='fnname'>new</a>(<br> func: &'a mut <a class="struct" href="../cranelift_codegen/ir/function/struct.Function.html" title="struct cranelift_codegen::ir::function::Function">Function</a>, <br> func_ctx: &'a mut <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilderContext.html" title="struct wasmer_clif_fork_frontend::FunctionBuilderContext">FunctionBuilderContext</a>, <br> position: &'a mut <a class="struct" href="../wasmer_clif_fork_frontend/struct.Position.html" title="struct wasmer_clif_fork_frontend::Position">Position</a><br>) -> Self</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#221-233' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new FunctionBuilder structure that will operate on a <code>Function</code> using a
|
||
<code>FunctionBuilderContext</code>.</p>
|
||
</div><h4 id='method.set_srcloc' class="method"><code id='set_srcloc.v'>pub fn <a href='#method.set_srcloc' class='fnname'>set_srcloc</a>(&mut self, srcloc: <a class="struct" href="../cranelift_codegen/ir/sourceloc/struct.SourceLoc.html" title="struct cranelift_codegen::ir::sourceloc::SourceLoc">SourceLoc</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#236-238' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set the source location that should be assigned to all new instructions.</p>
|
||
</div><h4 id='method.create_ebb' class="method"><code id='create_ebb.v'>pub fn <a href='#method.create_ebb' class='fnname'>create_ebb</a>(&mut self) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#241-250' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a new <code>Ebb</code> and returns its reference.</p>
|
||
</div><h4 id='method.switch_to_block' class="method"><code id='switch_to_block.v'>pub fn <a href='#method.switch_to_block' class='fnname'>switch_to_block</a>(&mut self, ebb: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#259-277' title='goto source code'>[src]</a></h4><div class='docblock'><p>After the call to this function, new instructions will be inserted into the designated
|
||
block, in the order they are declared. You must declare the types of the Ebb arguments
|
||
you will use here.</p>
|
||
<p>When inserting the terminator instruction (which doesn't have a fallthrough to its immediate
|
||
successor), the block will be declared filled and it will not be possible to append
|
||
instructions to it.</p>
|
||
</div><h4 id='method.seal_block' class="method"><code id='seal_block.v'>pub fn <a href='#method.seal_block' class='fnname'>seal_block</a>(&mut self, ebb: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#284-287' title='goto source code'>[src]</a></h4><div class='docblock'><p>Declares that all the predecessors of this block are known.</p>
|
||
<p>Function to call with <code>ebb</code> as soon as the last branch instruction to <code>ebb</code> has been
|
||
created. Forgetting to call this method on every block will cause inconsistencies in the
|
||
produced functions.</p>
|
||
</div><h4 id='method.seal_all_blocks' class="method"><code id='seal_all_blocks.v'>pub fn <a href='#method.seal_all_blocks' class='fnname'>seal_all_blocks</a>(&mut self)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#295-298' title='goto source code'>[src]</a></h4><div class='docblock'><p>Effectively calls seal_block on all blocks in the function.</p>
|
||
<p>It's more efficient to seal <code>Ebb</code>s as soon as possible, during
|
||
translation, but for frontends where this is impractical to do, this
|
||
function can be used at the end of translating all blocks to ensure
|
||
that everything is sealed.</p>
|
||
</div><h4 id='method.declare_var' class="method"><code id='declare_var.v'>pub fn <a href='#method.declare_var' class='fnname'>declare_var</a>(&mut self, var: <a class="struct" href="../wasmer_clif_fork_frontend/struct.Variable.html" title="struct wasmer_clif_fork_frontend::Variable">Variable</a>, ty: <a class="struct" href="../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#301-303' title='goto source code'>[src]</a></h4><div class='docblock'><p>In order to use a variable in a <code>use_var</code>, you need to declare its type with this method.</p>
|
||
</div><h4 id='method.use_var' class="method"><code id='use_var.v'>pub fn <a href='#method.use_var' class='fnname'>use_var</a>(&mut self, var: <a class="struct" href="../wasmer_clif_fork_frontend/struct.Variable.html" title="struct wasmer_clif_fork_frontend::Variable">Variable</a>) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#307-321' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the Cranelift IR value corresponding to the utilization at the current program
|
||
position of a previously defined user variable.</p>
|
||
</div><h4 id='method.def_var' class="method"><code id='def_var.v'>pub fn <a href='#method.def_var' class='fnname'>def_var</a>(&mut self, var: <a class="struct" href="../wasmer_clif_fork_frontend/struct.Variable.html" title="struct wasmer_clif_fork_frontend::Variable">Variable</a>, val: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#325-340' title='goto source code'>[src]</a></h4><div class='docblock'><p>Register a new definition of a user variable. The type of the value must be
|
||
the same as the type registered for the variable.</p>
|
||
</div><h4 id='method.set_val_label' class="method"><code id='set_val_label.v'>pub fn <a href='#method.set_val_label' class='fnname'>set_val_label</a>(&mut self, val: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, label: <a class="struct" href="../cranelift_codegen/ir/struct.ValueLabel.html" title="struct cranelift_codegen::ir::ValueLabel">ValueLabel</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#345-364' title='goto source code'>[src]</a></h4><div class='docblock'><p>Set label for Value</p>
|
||
<p>This will not do anything unless <code>func.dfg.collect_debug_info</code> is called first.</p>
|
||
</div><h4 id='method.create_jump_table' class="method"><code id='create_jump_table.v'>pub fn <a href='#method.create_jump_table' class='fnname'>create_jump_table</a>(&mut self, data: <a class="struct" href="../cranelift_codegen/ir/jumptable/struct.JumpTableData.html" title="struct cranelift_codegen::ir::jumptable::JumpTableData">JumpTableData</a>) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.JumpTable.html" title="struct cranelift_codegen::ir::entities::JumpTable">JumpTable</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#367-369' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a jump table in the function, to be used by <code>br_table</code> instructions.</p>
|
||
</div><h4 id='method.create_stack_slot' class="method"><code id='create_stack_slot.v'>pub fn <a href='#method.create_stack_slot' class='fnname'>create_stack_slot</a>(&mut self, data: <a class="struct" href="../cranelift_codegen/ir/stackslot/struct.StackSlotData.html" title="struct cranelift_codegen::ir::stackslot::StackSlotData">StackSlotData</a>) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.StackSlot.html" title="struct cranelift_codegen::ir::entities::StackSlot">StackSlot</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#373-375' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a stack slot in the function, to be used by <code>stack_load</code>, <code>stack_store</code> and
|
||
<code>stack_addr</code> instructions.</p>
|
||
</div><h4 id='method.import_signature' class="method"><code id='import_signature.v'>pub fn <a href='#method.import_signature' class='fnname'>import_signature</a>(&mut self, signature: <a class="struct" href="../cranelift_codegen/ir/extfunc/struct.Signature.html" title="struct cranelift_codegen::ir::extfunc::Signature">Signature</a>) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.SigRef.html" title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#378-380' title='goto source code'>[src]</a></h4><div class='docblock'><p>Adds a signature which can later be used to declare an external function import.</p>
|
||
</div><h4 id='method.import_function' class="method"><code id='import_function.v'>pub fn <a href='#method.import_function' class='fnname'>import_function</a>(&mut self, data: <a class="struct" href="../cranelift_codegen/ir/extfunc/struct.ExtFuncData.html" title="struct cranelift_codegen::ir::extfunc::ExtFuncData">ExtFuncData</a>) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.FuncRef.html" title="struct cranelift_codegen::ir::entities::FuncRef">FuncRef</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#383-385' title='goto source code'>[src]</a></h4><div class='docblock'><p>Declare an external function import.</p>
|
||
</div><h4 id='method.create_global_value' class="method"><code id='create_global_value.v'>pub fn <a href='#method.create_global_value' class='fnname'>create_global_value</a>(&mut self, data: <a class="enum" href="../cranelift_codegen/ir/globalvalue/enum.GlobalValueData.html" title="enum cranelift_codegen::ir::globalvalue::GlobalValueData">GlobalValueData</a>) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.GlobalValue.html" title="struct cranelift_codegen::ir::entities::GlobalValue">GlobalValue</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#388-390' title='goto source code'>[src]</a></h4><div class='docblock'><p>Declares a global value accessible to the function.</p>
|
||
</div><h4 id='method.create_heap' class="method"><code id='create_heap.v'>pub fn <a href='#method.create_heap' class='fnname'>create_heap</a>(&mut self, data: <a class="struct" href="../cranelift_codegen/ir/heap/struct.HeapData.html" title="struct cranelift_codegen::ir::heap::HeapData">HeapData</a>) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.Heap.html" title="struct cranelift_codegen::ir::entities::Heap">Heap</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#393-395' title='goto source code'>[src]</a></h4><div class='docblock'><p>Declares a heap accessible to the function.</p>
|
||
</div><h4 id='method.ins' class="method"><code id='ins.v'>pub fn <a href='#method.ins' class='fnname'>ins</a><'short>(&'short mut self) -> FuncInstBuilder<'short, 'a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#399-405' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns an object with the <a href="../codegen/ir/builder/trait.InstBuilder.html"><code>InstBuilder</code></a>
|
||
trait that allows to conveniently append an instruction to the current <code>Ebb</code> being built.</p>
|
||
</div><h4 id='method.ensure_inserted_ebb' class="method"><code id='ensure_inserted_ebb.v'>pub fn <a href='#method.ensure_inserted_ebb' class='fnname'>ensure_inserted_ebb</a>(&mut self)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#408-421' title='goto source code'>[src]</a></h4><div class='docblock'><p>Make sure that the current EBB is inserted in the layout.</p>
|
||
</div><h4 id='method.cursor' class="method"><code id='cursor.v'>pub fn <a href='#method.cursor' class='fnname'>cursor</a>(&mut self) -> <a class="struct" href="../cranelift_codegen/cursor/struct.FuncCursor.html" title="struct cranelift_codegen::cursor::FuncCursor">FuncCursor</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#427-432' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a <code>FuncCursor</code> pointed at the current position ready for inserting instructions.</p>
|
||
<p>This can be used to insert SSA code that doesn't need to access locals and that doesn't
|
||
need to know about <code>FunctionBuilder</code> at all.</p>
|
||
</div><h4 id='method.append_ebb_params_for_function_params' class="method"><code id='append_ebb_params_for_function_params.v'>pub fn <a href='#method.append_ebb_params_for_function_params' class='fnname'>append_ebb_params_for_function_params</a>(&mut self, ebb: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#437-450' title='goto source code'>[src]</a></h4><div class='docblock'><p>Append parameters to the given <code>Ebb</code> corresponding to the function
|
||
parameters. This can be used to set up the ebb parameters for the
|
||
entry block.</p>
|
||
</div><h4 id='method.append_ebb_params_for_function_returns' class="method"><code id='append_ebb_params_for_function_returns.v'>pub fn <a href='#method.append_ebb_params_for_function_returns' class='fnname'>append_ebb_params_for_function_returns</a>(&mut self, ebb: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#455-463' title='goto source code'>[src]</a></h4><div class='docblock'><p>Append parameters to the given <code>Ebb</code> corresponding to the function
|
||
return values. This can be used to set up the ebb parameters for a
|
||
function exit block.</p>
|
||
</div><h4 id='method.finalize' class="method"><code id='finalize.v'>pub fn <a href='#method.finalize' class='fnname'>finalize</a>(&mut self)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#468-492' title='goto source code'>[src]</a></h4><div class='docblock'><p>Declare that translation of the current function is complete. This
|
||
resets the state of the <code>FunctionBuilder</code> in preparation to be used
|
||
for another function.</p>
|
||
</div></div><h3 id='impl-1' class='impl'><code class='in-band'>impl<'a> <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html" title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><a href='#impl-1' class='anchor'></a><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#500-583' title='goto source code'>[src]</a></h3><div class='docblock'><p>All the functions documented in the previous block are write-only and help you build a valid
|
||
Cranelift IR functions via multiple debug asserts. However, you might need to improve the
|
||
performance of your translation perform more complex transformations to your Cranelift IR
|
||
function. The functions below help you inspect the function you're creating and modify it
|
||
in ways that can be unsafe if used incorrectly.</p>
|
||
</div><div class='impl-items'><h4 id='method.ebb_params' class="method"><code id='ebb_params.v'>pub fn <a href='#method.ebb_params' class='fnname'>ebb_params</a>(&self, ebb: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#503-505' title='goto source code'>[src]</a></h4><div class='docblock'><p>Retrieves all the parameters for an <code>Ebb</code> currently inferred from the jump instructions
|
||
inserted that target it and the SSA construction.</p>
|
||
</div><h4 id='method.signature' class="method"><code id='signature.v'>pub fn <a href='#method.signature' class='fnname'>signature</a>(&self, sigref: <a class="struct" href="../cranelift_codegen/ir/entities/struct.SigRef.html" title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&<a class="struct" href="../cranelift_codegen/ir/extfunc/struct.Signature.html" title="struct cranelift_codegen::ir::extfunc::Signature">Signature</a>></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#508-510' title='goto source code'>[src]</a></h4><div class='docblock'><p>Retrieves the signature with reference <code>sigref</code> previously added with <code>import_signature</code>.</p>
|
||
</div><h4 id='method.append_ebb_param' class="method"><code id='append_ebb_param.v'>pub fn <a href='#method.append_ebb_param' class='fnname'>append_ebb_param</a>(&mut self, ebb: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>, ty: <a class="struct" href="../cranelift_codegen/ir/types/struct.Type.html" title="struct cranelift_codegen::ir::types::Type">Type</a>) -> <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#517-525' title='goto source code'>[src]</a></h4><div class='docblock'><p>Creates a parameter for a specific <code>Ebb</code> by appending it to the list of already existing
|
||
parameters.</p>
|
||
<p><strong>Note:</strong> this function has to be called at the creation of the <code>Ebb</code> before adding
|
||
instructions to it, otherwise this could interfere with SSA construction.</p>
|
||
</div><h4 id='method.inst_results' class="method"><code id='inst_results.v'>pub fn <a href='#method.inst_results' class='fnname'>inst_results</a>(&self, inst: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#528-530' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns the result values of an instruction.</p>
|
||
</div><h4 id='method.change_jump_destination' class="method"><code id='change_jump_destination.v'>pub fn <a href='#method.change_jump_destination' class='fnname'>change_jump_destination</a>(&mut self, inst: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Inst.html" title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, new_dest: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Ebb.html" title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#536-545' title='goto source code'>[src]</a></h4><div class='docblock'><p>Changes the destination of a jump instruction after creation.</p>
|
||
<p><strong>Note:</strong> You are responsible for maintaining the coherence with the arguments of
|
||
other jump instructions.</p>
|
||
</div><h4 id='method.is_unreachable' class="method"><code id='is_unreachable.v'>pub fn <a href='#method.is_unreachable' class='fnname'>is_unreachable</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#550-561' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if and only if the current <code>Ebb</code> is sealed and has no predecessors declared.</p>
|
||
<p>The entry block of a function is never unreachable.</p>
|
||
</div><h4 id='method.is_pristine' class="method"><code id='is_pristine.v'>pub fn <a href='#method.is_pristine' class='fnname'>is_pristine</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#565-567' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if and only if no instructions have been added since the last call to
|
||
<code>switch_to_block</code>.</p>
|
||
</div><h4 id='method.is_filled' class="method"><code id='is_filled.v'>pub fn <a href='#method.is_filled' class='fnname'>is_filled</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#571-573' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if and only if a terminator instruction has been inserted since the
|
||
last call to <code>switch_to_block</code>.</p>
|
||
</div><h4 id='method.display' class="method"><code id='display.v'>pub fn <a href='#method.display' class='fnname'>display</a><'b, I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&'b dyn <a class="trait" href="../cranelift_codegen/isa/trait.TargetIsa.html" title="trait cranelift_codegen::isa::TargetIsa">TargetIsa</a>>>>(<br> &'b self, <br> isa: I<br>) -> <a class="struct" href="../cranelift_codegen/ir/function/struct.DisplayFunction.html" title="struct cranelift_codegen::ir::function::DisplayFunction">DisplayFunction</a></code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#580-582' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns a displayable object for the function as it is.</p>
|
||
<p>Useful for debug purposes. Use it with <code>None</code> for standard printing.</p>
|
||
</div></div><h3 id='impl-2' class='impl'><code class='in-band'>impl<'a> <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html" title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><a href='#impl-2' class='anchor'></a><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#586-839' title='goto source code'>[src]</a></h3><div class='docblock'><p>Helper functions</p>
|
||
</div><div class='impl-items'><h4 id='method.call_memcpy' class="method"><code id='call_memcpy.v'>pub fn <a href='#method.call_memcpy' class='fnname'>call_memcpy</a>(<br> &mut self, <br> config: <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a>, <br> dest: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> src: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> size: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><br>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#593-616' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calls libc.memcpy</p>
|
||
<p>Copies the <code>size</code> bytes from <code>src</code> to <code>dest</code>, assumes that <code>src + size</code>
|
||
won't overlap onto <code>dest</code>. If <code>dest</code> and <code>src</code> overlap, the behavior is
|
||
undefined. Applications in which <code>dest</code> and <code>src</code> might overlap should
|
||
use <code>call_memmove</code> instead.</p>
|
||
</div><h4 id='method.emit_small_memcpy' class="method"><code id='emit_small_memcpy.v'>pub fn <a href='#method.emit_small_memcpy' class='fnname'>emit_small_memcpy</a>(<br> &mut self, <br> config: <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a>, <br> dest: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> src: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <br> dest_align: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <br> src_align: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><br>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#619-667' title='goto source code'>[src]</a></h4><div class='docblock'><p>Optimised memcpy for small copies.</p>
|
||
</div><h4 id='method.call_memset' class="method"><code id='call_memset.v'>pub fn <a href='#method.call_memset' class='fnname'>call_memset</a>(<br> &mut self, <br> config: <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a>, <br> buffer: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> ch: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> size: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><br>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#672-696' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calls libc.memset</p>
|
||
<p>Writes <code>size</code> bytes of i8 value <code>ch</code> to memory starting at <code>buffer</code>.</p>
|
||
</div><h4 id='method.emit_small_memset' class="method"><code id='emit_small_memset.v'>pub fn <a href='#method.emit_small_memset' class='fnname'>emit_small_memset</a>(<br> &mut self, <br> config: <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a>, <br> buffer: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> ch: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <br> size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <br> buffer_align: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><br>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#701-760' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calls libc.memset</p>
|
||
<p>Writes <code>size</code> bytes of value <code>ch</code> to memory starting at <code>buffer</code>.</p>
|
||
</div><h4 id='method.call_memmove' class="method"><code id='call_memmove.v'>pub fn <a href='#method.call_memmove' class='fnname'>call_memmove</a>(<br> &mut self, <br> config: <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a>, <br> dest: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> source: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> size: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a><br>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#766-789' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calls libc.memmove</p>
|
||
<p>Copies <code>size</code> bytes from memory starting at <code>source</code> to memory starting
|
||
at <code>dest</code>. <code>source</code> is always read before writing to <code>dest</code>.</p>
|
||
</div><h4 id='method.emit_small_memmove' class="method"><code id='emit_small_memmove.v'>pub fn <a href='#method.emit_small_memmove' class='fnname'>emit_small_memmove</a>(<br> &mut self, <br> config: <a class="struct" href="../cranelift_codegen/isa/struct.TargetFrontendConfig.html" title="struct cranelift_codegen::isa::TargetFrontendConfig">TargetFrontendConfig</a>, <br> dest: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> src: <a class="struct" href="../cranelift_codegen/ir/entities/struct.Value.html" title="struct cranelift_codegen::ir::entities::Value">Value</a>, <br> size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <br> dest_align: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>, <br> src_align: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><br>)</code><a class='srclink' href='../src/wasmer_clif_fork_frontend/frontend.rs.html#792-838' title='goto source code'>[src]</a></h4><div class='docblock'><p>Optimised memmove for small moves.</p>
|
||
</div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-Send' class='impl'><code class='in-band'>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html" title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html" title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html" title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl<'a> <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html" title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl<'a> !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html" title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-From%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</code><a href='#impl-From%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#552-554' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.from' class="method hidden"><code id='from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(t: T) -> T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#553' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryFrom%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>, </span></code><a href='#impl-TryFrom%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#571-577' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error' class="type"><code id='Error.t'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error' class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_from' class="method hidden"><code id='try_from.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from' class='fnname'>try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#574-576' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Into%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>, </span></code><a href='#impl-Into%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-548' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.into' class="method hidden"><code id='into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into' class='fnname'>into</a>(self) -> U</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#545-547' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-TryInto%3CU%3E' class='impl'><code class='in-band'>impl<T, U> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T <span class="where fmt-newline">where<br> U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><a href='#impl-TryInto%3CU%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#559-566' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.Error-1' class="type"><code id='Error.t-1'>type <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error' class="type">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></code></h4><div class='docblock'><p>The type returned in the event of a conversion error.</p>
|
||
</div><h4 id='method.try_into' class="method hidden"><code id='try_into.v'>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into' class='fnname'>try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#563-565' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code id='borrow.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||
</div></div><h3 id='impl-BorrowMut%3CT%3E' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-BorrowMut%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow_mut' class="method hidden"><code id='borrow_mut.v'>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut' class='fnname'>borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||
</div></div><h3 id='impl-Any' class='impl'><code class='in-band'>impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code id='type_id.v'>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||
</div></div></div></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "wasmer_clif_fork_frontend";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |