[][src]Struct mun_runtime::StructRef

pub struct StructRef { /* fields omitted */ }

Type-agnostic wrapper for interoperability with a Mun struct.

Implementations

impl StructRef[src]

pub fn into_raw(self) -> RawStruct[src]

Consumes the StructRef, returning a raw Mun struct.

pub fn type_info<'r>(
    struct_ref: &Self,
    runtime_ref: &'r Runtime
) -> &'r TypeInfo
[src]

Returns the type information of the struct.

pub fn get<T: ReturnTypeReflection>(
    &self,
    field_name: &str
) -> Result<T, String>
[src]

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

pub fn replace<T: ArgumentReflection>(
    &mut self,
    field_name: &str,
    value: T
) -> Result<T, String>
[src]

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

pub fn set<T: ArgumentReflection>(
    &mut self,
    field_name: &str,
    value: T
) -> Result<(), String>
[src]

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

Trait Implementations

impl ArgumentReflection for StructRef[src]

type Marshalled = RawStruct

The resulting type after dereferencing.

impl Clone for StructRef[src]

impl ReturnTypeReflection for StructRef[src]

type Marshalled = RawStruct

The resulting type after marshaling.

Auto Trait Implementations

impl !RefUnwindSafe for StructRef

impl !Send for StructRef

impl !Sync for StructRef

impl Unpin for StructRef

impl !UnwindSafe for StructRef

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> From<T> for T[src]

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

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>,