Skip to main content

ObjectEncode

Trait ObjectEncode 

Source
pub trait ObjectEncode: Send + Sync {
    // Required method
    fn object_encoding(&self, cx: &mut Cx) -> Result<ObjectEncoding>;
}
Expand description

Contract: an object that can describe its own encoding.

The kernel defines this trait; objects implement it to choose how codecs render them back into forms.

Required Methods§

Source

fn object_encoding(&self, cx: &mut Cx) -> Result<ObjectEncoding>

Returns the ObjectEncoding this object should be rendered as.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§