Skip to main content

GeneratedRecordAccess

Trait GeneratedRecordAccess 

Source
pub trait GeneratedRecordAccess: RecordSchema {
    type Access<'a>;
    type NewBuilder<'a>;
    type UpdateBuilder<'a>;

    const DATA_LEN: usize;

    // Required methods
    fn wrap<'a>(buf: &'a [u8]) -> Self::Access<'a>;
    fn wrap_new<'a>(buf: &'a mut [u8]) -> Self::NewBuilder<'a>;
    fn wrap_update<'a>(buf: &'a mut [u8]) -> Self::UpdateBuilder<'a>;
}
Expand description

Generated typed accessors for a fixed-layout record.

Required Associated Constants§

Source

const DATA_LEN: usize

Record data bytes excluding host-owned metadata.

Required Associated Types§

Source

type Access<'a>

Read-only accessor type.

Source

type NewBuilder<'a>

Builder used when creating a new record.

Source

type UpdateBuilder<'a>

Builder used when updating an existing record.

Required Methods§

Source

fn wrap<'a>(buf: &'a [u8]) -> Self::Access<'a>

Wraps a record buffer in a read-only accessor.

Source

fn wrap_new<'a>(buf: &'a mut [u8]) -> Self::NewBuilder<'a>

Wraps a record buffer in a creation builder.

Source

fn wrap_update<'a>(buf: &'a mut [u8]) -> Self::UpdateBuilder<'a>

Wraps a record buffer in an update builder.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§