Skip to main content

Object

Struct Object 

Source
pub struct Object;
Expand description

System.Object as a class: what the original instantiates for an element it reads as typeof(object) (the scope of scoped code, a member of an element type that is not in the type map). It has no properties, so the members of its document are read and dropped.

Trait Implementations§

Source§

impl BsonClass for Object

Source§

const CLASS: &'static ClassType

Source§

impl BsonObject for Object

Source§

fn get_type(&self) -> &'static ClassType

object.GetType().
Source§

fn get_property_value(&self, index: usize) -> ValueRef<'_>

Reads the property with the given index in ClassType::properties.
Source§

fn set_property_value( &mut self, index: usize, value: Value, ) -> Result<(), Error>

Assigns the property with the given index. The value is cast to the type of the property; one of another type is an InvalidCastException.
Source§

fn clone_object(&self) -> Box<dyn BsonObject>

A copy of the object behind a new handle.
Source§

fn equals(&self, other: &dyn BsonObject) -> bool

Whether the other object is of the same class and has equal properties.
Source§

fn as_any(&self) -> &dyn Any

Source§

fn into_any(self: Box<Self>) -> Box<dyn Any + Send + Sync>

Source§

fn as_expando(&mut self) -> Option<&mut dyn IExpando>

instance as IExpando.
Source§

impl BsonValue for Object

Source§

const TYPE: Type

typeof(T).
Source§

fn as_value(&self) -> ValueRef<'_>

The value as the serializer receives it: boxing, without a copy.
Source§

fn from_value(value: Value) -> Result<Self, Error>

The cast of a deserialized value to the type of the property it is assigned to. The deserializer does not assign null.
Source§

impl Clone for Object

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Object

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Object

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Object

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Object

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.