Skip to main content

Changes

Trait Changes 

Source
pub trait Changes: Sized {
    type Slots: Slots;
    type Id: Id<Slot = <Self::Slots as Slots>::Physical>;
    type Read<'a>: Interest<Id = Self::Id, Data = <Self::Slots as Slots>::Data>
       where Self: 'a;
    type Write<'a>: Write + Interest<Id = Self::Id, Data = <Self::Slots as Slots>::Data>
       where Self: 'a;
    type Tail<'a>: Tail
       where Self: 'a;
    type Deletion<'a>: Delete
       where Self: 'a;

    // Required methods
    fn try_new(
        capacity: <Self::Slots as Slots>::Capacity,
    ) -> Result<Self, Error>;
    fn read(&mut self, id: Self::Id) -> Option<Self::Read<'_>>;
    fn write(&mut self, id: Self::Id) -> Option<Self::Write<'_>>;
    fn try_delete(
        &mut self,
        entries: impl Iterator<Item = Result<Option<(Self::Id, Filter)>, Index<<Self::Slots as Slots>::Index>>>,
    ) -> Result<Self::Deletion<'_>, Index<<Self::Slots as Slots>::Index>>;
    fn is_empty(&self) -> bool;
    fn len(&self) -> usize;
    fn batch(&mut self, budget: &mut impl Budget) -> Self::Tail<'_>;
    fn tail(&mut self, limit: usize) -> Self::Tail<'_>;
}

Required Associated Types§

Source

type Slots: Slots

Source

type Id: Id<Slot = <Self::Slots as Slots>::Physical>

Source

type Read<'a>: Interest<Id = Self::Id, Data = <Self::Slots as Slots>::Data>
where Self: 'a,

Source

type Write<'a>: Write + Interest<Id = Self::Id, Data = <Self::Slots as Slots>::Data>
where Self: 'a,

Source

type Tail<'a>: Tail
where Self: 'a,

Source

type Deletion<'a>: Delete
where Self: 'a,

Required Methods§

Source

fn try_new(capacity: <Self::Slots as Slots>::Capacity) -> Result<Self, Error>

Source

fn read(&mut self, id: Self::Id) -> Option<Self::Read<'_>>

Source

fn write(&mut self, id: Self::Id) -> Option<Self::Write<'_>>

Source

fn try_delete( &mut self, entries: impl Iterator<Item = Result<Option<(Self::Id, Filter)>, Index<<Self::Slots as Slots>::Index>>>, ) -> Result<Self::Deletion<'_>, Index<<Self::Slots as Slots>::Index>>

Source

fn is_empty(&self) -> bool

Source

fn len(&self) -> usize

Source

fn batch(&mut self, budget: &mut impl Budget) -> Self::Tail<'_>

Source

fn tail(&mut self, limit: usize) -> Self::Tail<'_>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§