[−][src]Struct watson::Program
Fields
sections: Vec<Section>
Implementations
impl Program
[src]
pub fn new() -> Self
[src]
pub fn find_exported_function<'a>(
&'a self,
name: &str
) -> Result<&'a Export, &'static str>
[src]
&'a self,
name: &str
) -> Result<&'a Export, &'static str>
pub fn find_code_block<'a>(
&'a self,
index: usize
) -> Result<&'a CodeBlock, &'static str>
[src]
&'a self,
index: usize
) -> Result<&'a CodeBlock, &'static str>
pub fn create_import<'a>(
&'a mut self,
name: &str,
inputs: &[ValueType],
outputs: &[ValueType]
) -> Result<usize, &'static str>
[src]
&'a mut self,
name: &str,
inputs: &[ValueType],
outputs: &[ValueType]
) -> Result<usize, &'static str>
pub fn create_export<'a>(
&'a mut self,
name: &str,
inputs: &[ValueType],
outputs: &[ValueType]
) -> Result<(&'a mut CodeBlock, usize), &'static str>
[src]
&'a mut self,
name: &str,
inputs: &[ValueType],
outputs: &[ValueType]
) -> Result<(&'a mut CodeBlock, usize), &'static str>
pub fn create_function<'a>(
&'a mut self,
inputs: &[ValueType],
outputs: &[ValueType]
) -> Result<(&'a mut CodeBlock, usize), &'static str>
[src]
&'a mut self,
inputs: &[ValueType],
outputs: &[ValueType]
) -> Result<(&'a mut CodeBlock, usize), &'static str>
pub fn create_memory<'a>(
&'a mut self,
name: &str,
min: usize,
max: Option<usize>
) -> Result<(&'a mut WasmMemory, usize), &'static str>
[src]
&'a mut self,
name: &str,
min: usize,
max: Option<usize>
) -> Result<(&'a mut WasmMemory, usize), &'static str>
Trait Implementations
impl Clone for Program
[src]
fn clone(&self) -> Program
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Program
[src]
impl Default for Program
[src]
impl<'de> Deserialize<'de> for Program
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl InterpretableProgram for Program
[src]
fn import_fn_details(
&self,
index: usize
) -> Result<(&str, &str, usize), &'static str>
[src]
&self,
index: usize
) -> Result<(&str, &str, usize), &'static str>
fn load_data_into_memory(&self, mem: &mut Vec<u8>) -> Result<(), &'static str>
[src]
fn initial_memory_size(&self) -> usize
[src]
fn import_fn_count(&self) -> usize
[src]
fn fetch_export_fn_index(
&self,
name: &str
) -> Result<(usize, usize), &'static str>
[src]
&self,
name: &str
) -> Result<(usize, usize), &'static str>
fn fetch_instruction<'a>(
&'a self,
position: &[usize]
) -> Result<Option<&'a Instruction>, &'static str>
[src]
&'a self,
position: &[usize]
) -> Result<Option<&'a Instruction>, &'static str>
fn create_locals(
&self,
position: &[usize]
) -> Result<Vec<WasmValue>, &'static str>
[src]
&self,
position: &[usize]
) -> Result<Vec<WasmValue>, &'static str>
impl PartialEq<Program> for Program
[src]
impl Serialize for Program
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Program
[src]
impl WasmCompiler for Program
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,