Indexable

Trait Indexable 

Source
pub trait Indexable {
    type Iter: IntoIterator<Item = Box<dyn IndexableField>>;

    // Required methods
    fn index(&self) -> Self::Iter;
    fn timestamp(&self) -> DateTime<Utc>;
    fn dyn_partial_cmp(&self, i: &dyn IndexableField) -> Option<Ordering>;
}
Expand description

This must be implemented for a type to be indexable

Required Associated Types§

Required Methods§

Source

fn index(&self) -> Self::Iter

Return an iterator of indexable values in this record.

Source

fn timestamp(&self) -> DateTime<Utc>

return the timestamp of this record. This will only be used to figure out what file to put the record in. The only real reason why there are multiple files is to ensure logs are rotated periodically so they can be backed up, and potentially archived permanently. If you just return the same timestamp for every record then there will just be one file and everything else will work fine.

Source

fn dyn_partial_cmp(&self, i: &dyn IndexableField) -> Option<Ordering>

given an indexable field object return an ordering if the field is relevant to this record

Implementors§