Skip to main content

MutableIndex

Trait MutableIndex 

Source
pub trait MutableIndex: Any {
    // Required methods
    fn as_index(&self) -> &dyn Index;
    fn change_id_index(
        &self,
        heads: &mut dyn Iterator<Item = &CommitId>,
    ) -> Box<dyn ChangeIdIndex + '_>;
    fn add_commit<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        commit: &'life1 Commit,
    ) -> Pin<Box<dyn Future<Output = IndexResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn merge_in(&mut self, other: &dyn ReadonlyIndex) -> IndexResult<()>;
}

Required Methods§

Source

fn as_index(&self) -> &dyn Index

Source

fn change_id_index( &self, heads: &mut dyn Iterator<Item = &CommitId>, ) -> Box<dyn ChangeIdIndex + '_>

Source

fn add_commit<'life0, 'life1, 'async_trait>( &'life0 mut self, commit: &'life1 Commit, ) -> Pin<Box<dyn Future<Output = IndexResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn merge_in(&mut self, other: &dyn ReadonlyIndex) -> IndexResult<()>

Implementations§

Source§

impl dyn MutableIndex

Source

pub fn downcast<T: MutableIndex>(self: Box<Self>) -> Option<Box<T>>

Downcasts to the implementation type.

Source

pub fn downcast_ref<T: MutableIndex>(&self) -> Option<&T>

Returns reference of the implementation type.

Implementors§