pub struct StructObject { /* private fields */ }
Implementations§
Source§impl StructObject
impl StructObject
pub fn new_definition(members: &[(&str, Option<DataTypeConstraint>)]) -> Self
pub fn new_instance( struct_base_definition: Gc<StructObject>, values: &[DataObjectRef], ) -> Result<Self, DataTypeConstraintError>
pub fn member_names(&self) -> Vec<Box<str>>
pub fn type_constraints(&self) -> Vec<Option<Box<DataTypeConstraint>>>
pub fn base_definition(&self) -> Option<Gc<StructObject>>
pub fn index_of(&self, member_name: &str) -> Option<usize>
pub fn type_constraint( &self, member_name: &str, ) -> Result<Option<Box<DataTypeConstraint>>, DataTypeConstraintError>
pub fn get_member( &self, member_name: &str, ) -> Result<DataObjectRef, DataTypeConstraintError>
pub fn set_member( &self, member_name: &str, value: &DataObject, ) -> Result<(), DataTypeConstraintError>
pub fn is_definition(&self) -> bool
Trait Implementations§
Source§impl Debug for StructObject
impl Debug for StructObject
Source§impl Display for StructObject
impl Display for StructObject
Source§impl Drop for StructObject
impl Drop for StructObject
Source§impl Trace for StructObject
impl Trace for StructObject
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs
Finalize::finalize()
on this object and all
contained subobjectsAuto Trait Implementations§
impl !Freeze for StructObject
impl !RefUnwindSafe for StructObject
impl !Send for StructObject
impl !Sync for StructObject
impl Unpin for StructObject
impl !UnwindSafe for StructObject
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