Skip to main content

NotificationRecordLayout

Trait NotificationRecordLayout 

Source
pub trait NotificationRecordLayout: Send + Sync {
    // Required methods
    fn key(
        &self,
        control: &StorageReadControl,
    ) -> VersionResult<BudgetedVec<u8>>;
    fn encode(
        &self,
        publication: &NotificationPublication,
        control: &StorageReadControl,
    ) -> VersionResult<SharedRecordValue>;
    fn decode<'a>(
        &self,
        key: &[u8],
        record: &'a [u8],
        control: &StorageReadControl,
    ) -> VersionResult<NotificationPublicationView<'a>>;
}
Expand description

Provider-owned metadata addressing and lossless row encoding. Native adapters must use their stable data namespace, independent of restored transaction history.

Required Methods§

Source

fn key(&self, control: &StorageReadControl) -> VersionResult<BudgetedVec<u8>>

Source

fn encode( &self, publication: &NotificationPublication, control: &StorageReadControl, ) -> VersionResult<SharedRecordValue>

Source

fn decode<'a>( &self, key: &[u8], record: &'a [u8], control: &StorageReadControl, ) -> VersionResult<NotificationPublicationView<'a>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§