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§
Required Methods§
Sourcefn set_mark(&mut self, mark: Self::Mark) -> Option<Self::Mark>
fn set_mark(&mut self, mark: Self::Mark) -> Option<Self::Mark>
Mark this record.
Return the previous mark if any.
Sourcefn clear_mark(&mut self) -> Option<Self::Mark>
fn clear_mark(&mut self) -> Option<Self::Mark>
Clear the mark from this record.
Return the previous mark if any.