Trait Strings

Source
pub trait Strings {
    type Offsets<'a>: GetIndex<Output = u64> + 'a
       where Self: 'a;

    // Required methods
    fn message(&self) -> &[u8] ;
    fn message_offset(&self) -> Self::Offsets<'_>;
    fn tag_name(&self) -> &[u8] ;
    fn tag_name_offset(&self) -> Self::Offsets<'_>;
}
Expand description

Trait for backend storage of string properties (either in-memory or memory-mapped)

Required Associated Types§

Source

type Offsets<'a>: GetIndex<Output = u64> + 'a where Self: 'a

Required Methods§

Source

fn message(&self) -> &[u8]

Source

fn message_offset(&self) -> Self::Offsets<'_>

Source

fn tag_name(&self) -> &[u8]

Source

fn tag_name_offset(&self) -> Self::Offsets<'_>

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§

Source§

impl Strings for MappedStrings

Source§

type Offsets<'a> = &'a NumberMmap<BigEndian, u64, Mmap> where Self: 'a

Source§

impl Strings for VecStrings

Source§

type Offsets<'a> = &'a [u64] where Self: 'a