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(&mut self, commit: &Commit) -> Result<(), IndexError>;
    fn merge_in(&mut self, other: &dyn ReadonlyIndex);
}

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(&mut self, commit: &Commit) -> Result<(), IndexError>

Source

fn merge_in(&mut self, other: &dyn ReadonlyIndex)

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§