[][src]Struct holochain_wasm_utils::memory::stack::WasmStack

pub struct WasmStack { /* fields omitted */ }

Methods

impl WasmStack[src]

pub fn try_from_ribosome_encoding(
    maybe_encoded_allocation: RibosomeEncodingBits
) -> Result<WasmStack, RibosomeEncodedValue>
[src]

equivalent to TryFrom for WasmStack not implemented as a trait because RibosomeEncodingBits is a primitive and that would couple stacks to ribosome encoding wraps WasmAllocation::try_from_ribosome_encoding internally but has a "higher level" return signature intended for direct use/return in/from ribosome fns

impl WasmStack[src]

pub fn max() -> MemoryBits[src]

pub fn min() -> MemoryInt[src]

pub fn new() -> WasmStack[src]

pub fn next_allocation(
    self,
    length: Length
) -> Result<WasmAllocation, AllocationError>
[src]

pub fn allocate(
    &mut self,
    allocation: WasmAllocation
) -> Result<Top, AllocationError>
[src]

pub fn deallocate(
    &mut self,
    allocation: WasmAllocation
) -> Result<Top, AllocationError>
[src]

pub fn top(self) -> Top[src]

impl WasmStack[src]

pub fn write_string(&mut self, s: &str) -> AllocationResult[src]

Write a string in wasm memory according to stack state.

pub fn write_json<J: TryInto<JsonString>>(
    &mut self,
    jsonable: J
) -> AllocationResult
[src]

Write a data struct as a json string in wasm memory according to stack state.

Trait Implementations

impl Clone for WasmStack[src]

impl Copy for WasmStack[src]

impl Debug for WasmStack[src]

impl Default for WasmStack[src]

impl PartialEq<WasmStack> for WasmStack[src]

impl StructuralPartialEq for WasmStack[src]

impl TryFrom<WasmAllocation> for WasmStack[src]

type Error = AllocationError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,