pub struct BopStruct { /* private fields */ }Expand description
A user-defined struct value. Carries the module it was
declared in plus the bare type name, so two modules that
happen to declare struct Color { ... } independently
produce distinct values even when they share a name. The
module path is <root> for the top-level program and
<builtin> for engine-registered builtins like
RuntimeError; for user modules it’s the dot-joined use
path ("std.math", "game.entity", …). Fields are stored
in declaration order so iteration and Display stay stable.
Implementations§
Source§impl BopStruct
impl BopStruct
pub fn type_name(&self) -> &str
Sourcepub fn module_path(&self) -> &str
pub fn module_path(&self) -> &str
Module this struct type was declared in. Forms one half
of the type’s identity — the other half is the bare
Self::type_name.
pub fn fields(&self) -> &[(String, Value)]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BopStruct
impl !RefUnwindSafe for BopStruct
impl !Send for BopStruct
impl !Sync for BopStruct
impl Unpin for BopStruct
impl UnsafeUnpin for BopStruct
impl !UnwindSafe for BopStruct
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