Skip to main content

ObjectCatalog

Trait ObjectCatalog 

Source
pub trait ObjectCatalog:
    Catalog<ObjectDefinitions>
    + Send
    + Sync
    + 'static {
    // Provided methods
    fn definitions() -> Self::Entries { ... }
    fn definition_count() -> usize { ... }
    fn validate() -> Result<(), Error> { ... }
    fn encode<T>(
        value: &T,
        max_payload_bytes: NonZero<usize>,
    ) -> Result<ObjectValue, Error>
       where T: StoredObject,
             Self: Contains<T> { ... }
    fn decode<T>(
        value: &ObjectValue,
        max_payload_bytes: NonZero<usize>,
    ) -> Result<T, Error>
       where T: StoredObject,
             Self: Contains<T> { ... }
    fn validate_value(
        value: &ObjectValue,
        max_payload_bytes: NonZero<usize>,
    ) -> Result<(), Error> { ... }
}

Provided Methods§

Source

fn definitions() -> Self::Entries

Source

fn definition_count() -> usize

Source

fn validate() -> Result<(), Error>

Source

fn encode<T>( value: &T, max_payload_bytes: NonZero<usize>, ) -> Result<ObjectValue, Error>
where T: StoredObject, Self: Contains<T>,

Source

fn decode<T>( value: &ObjectValue, max_payload_bytes: NonZero<usize>, ) -> Result<T, Error>
where T: StoredObject, Self: Contains<T>,

Source

fn validate_value( value: &ObjectValue, max_payload_bytes: NonZero<usize>, ) -> Result<(), Error>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<C> ObjectCatalog for C
where C: Catalog<ObjectDefinitions> + Send + Sync + 'static,