Skip to main content

Extension

Trait Extension 

Source
pub trait Extension:
    Clone
    + PartialEq
    + Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn class(&self) -> &str;
    fn to_array(&self) -> Array<Self>;
}
Expand description

Objects of classes other than stdClass that a crate carries in Value::Ext (for the database: Document and Operator).

Required Methods§

Source

fn class(&self) -> &str

get_class().

Source

fn to_array(&self) -> Array<Self>

(array) / getArrayCopy(): what the codecs write for the object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§