pub struct FieldAccess;Expand description
Access fields of constructor objects.
Implementations§
Source§impl FieldAccess
impl FieldAccess
Sourcepub fn get_field(obj: &RtObject, field_index: usize) -> Option<RtObject>
pub fn get_field(obj: &RtObject, field_index: usize) -> Option<RtObject>
Get a field of a constructor object by index.
Sourcepub fn set_field(obj: &RtObject, field_index: usize, value: RtObject) -> bool
pub fn set_field(obj: &RtObject, field_index: usize, value: RtObject) -> bool
Set a field of a constructor object by index (requires unique ownership).
Sourcepub fn get_ctor_index(obj: &RtObject) -> Option<u32>
pub fn get_ctor_index(obj: &RtObject) -> Option<u32>
Get the constructor index of an object.
Sourcepub fn num_fields(obj: &RtObject) -> Option<usize>
pub fn num_fields(obj: &RtObject) -> Option<usize>
Get the number of fields of a constructor object.
Auto Trait Implementations§
impl Freeze for FieldAccess
impl RefUnwindSafe for FieldAccess
impl Send for FieldAccess
impl Sync for FieldAccess
impl Unpin for FieldAccess
impl UnsafeUnpin for FieldAccess
impl UnwindSafe for FieldAccess
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