pub struct StructInstance { /* private fields */ }Implementations§
Source§impl StructInstance
impl StructInstance
pub fn type_name(&self) -> &str
pub fn field<T: FromLustValue>(&self, field: &str) -> Result<T>
pub fn set_field<V: IntoTypedValue>(&self, field: &str, value: V) -> Result<()>
pub fn update_field<F, V>(&self, field: &str, update: F) -> Result<()>
pub fn as_value(&self) -> &Value
Trait Implementations§
Source§impl Clone for StructInstance
impl Clone for StructInstance
Source§fn clone(&self) -> StructInstance
fn clone(&self) -> StructInstance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl FromLustValue for StructInstance
impl FromLustValue for StructInstance
fn from_value(value: Value) -> Result<Self>
fn matches_lust_type(ty: &Type) -> bool
fn type_description() -> &'static str
Source§impl IntoLustValue for StructInstance
impl IntoLustValue for StructInstance
fn into_value(self) -> Value
fn matches_lust_type(ty: &Type) -> bool
fn type_description() -> &'static str
Source§impl IntoTypedValue for StructInstance
impl IntoTypedValue for StructInstance
fn into_typed_value(self) -> TypedValue
Auto Trait Implementations§
impl Freeze for StructInstance
impl !RefUnwindSafe for StructInstance
impl !Send for StructInstance
impl !Sync for StructInstance
impl Unpin for StructInstance
impl !UnwindSafe for StructInstance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more