[−][src]Struct mun_runtime::StructRef
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]
struct_ref: &Self,
runtime_ref: &'r Runtime
) -> &'r TypeInfo
Returns the type information of the struct.
pub fn get<T: ReturnTypeReflection>(
&self,
field_name: &str
) -> Result<T, String>
[src]
&self,
field_name: &str
) -> Result<T, String>
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]
&mut self,
field_name: &str,
value: T
) -> Result<T, String>
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]
&mut self,
field_name: &str,
value: T
) -> Result<(), String>
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.
fn type_guid(&self, runtime: &Runtime) -> Guid
[src]
fn type_name(&self, runtime: &Runtime) -> &str
[src]
fn marshal(self) -> Self::Marshalled
[src]
impl Clone for StructRef
[src]
impl ReturnTypeReflection for StructRef
[src]
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]
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> 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,