pub struct ClassType {
pub name: &'static str,
pub type_id: fn() -> TypeId,
pub create_instance: fn() -> Box<dyn BsonObject>,
pub properties: &'static [PropertyInfo],
pub is_expando: bool,
}Expand description
A class, as declared: what the original reads from the System.Type of
an object. [bson_class!] writes one.
Fields§
§name: &'static strType.Name.
type_id: fn() -> TypeIdThe identity of the Rust type.
create_instance: fn() -> Box<dyn BsonObject>Activator.CreateInstance(type, true).
properties: &'static [PropertyInfo]The properties in the order Type.GetProperties returns them: the
ones the class declares, then the ones of its base classes.
is_expando: booltypeof(IExpando).IsAssignableFrom(type).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClassType
impl RefUnwindSafe for ClassType
impl Send for ClassType
impl Sync for ClassType
impl Unpin for ClassType
impl UnsafeUnpin for ClassType
impl UnwindSafe for ClassType
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