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§
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)
Implementations§
Source§impl dyn MutableIndex
impl dyn MutableIndex
Sourcepub fn downcast<T: MutableIndex>(self: Box<Self>) -> Option<Box<T>>
pub fn downcast<T: MutableIndex>(self: Box<Self>) -> Option<Box<T>>
Downcasts to the implementation type.
Sourcepub fn downcast_ref<T: MutableIndex>(&self) -> Option<&T>
pub fn downcast_ref<T: MutableIndex>(&self) -> Option<&T>
Returns reference of the implementation type.