Struct mun_runtime::StructRef

source ·
pub struct StructRef<'s> { /* private fields */ }
Expand description

Type-agnostic wrapper for interoperability with a Mun struct. This is merely a reference to the Mun struct, that will be garbage collected unless it is rooted.

Implementations§

Consumes the StructRef, returning a raw Mun struct.

Roots the StructRef.

Returns the type information of the struct.

Retrieves the value of the field corresponding to the specified field_name.

Replaces the value of the field corresponding to the specified field_name and returns the old value.

Sets the value of the field corresponding to the specified field_name.

Trait Implementations§

Retrieves the argument’s type information.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
The type used in the Mun ABI
Marshals from a value (i.e. Mun -> Rust).
Marshals itself into a Marshalled value (i.e. Rust -> Mun).
Marshals the value at memory location ptr into a Marshalled value (i.e. Mun -> Rust).
Marshals value to memory location ptr (i.e. Rust -> Mun).

Returns true if this specified type can be stored in an instance of this type

Returns a type hint to indicate the name of this type

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.