Markable

Trait Markable 

Source
pub trait Markable {
    type Mark;

    // Required methods
    fn get_mark(&self) -> Option<&Self::Mark>;
    fn set_mark(&mut self, mark: Self::Mark) -> Option<Self::Mark>;
    fn clear_mark(&mut self) -> Option<Self::Mark>;
}
Expand description

A trait to mark records.

Marks are essentially metadata attached to records. Marks can be used to associated IDs, epochs, or flags to records.

Required Associated Types§

Source

type Mark

Type of the mark

Required Methods§

Source

fn get_mark(&self) -> Option<&Self::Mark>

Get the mark associated with this type.

Source

fn set_mark(&mut self, mark: Self::Mark) -> Option<Self::Mark>

Mark this record.

Return the previous mark if any.

Source

fn clear_mark(&mut self) -> Option<Self::Mark>

Clear the mark from this record.

Return the previous mark if any.

Implementors§