pub struct Branches { /* private fields */ }
Implementations§
source§impl Branches
impl Branches
pub fn new(branches: impl IntoIterator<Item = Branch>) -> Self
pub fn update(&mut self, repo: &dyn Repo)
pub fn insert(&mut self, branch: Branch)
pub fn extend(&mut self, branches: impl Iterator<Item = Branch>)
pub fn contains_oid(&self, oid: Oid) -> bool
pub fn get(&self, oid: Oid) -> Option<&[Branch]>
pub fn remove(&mut self, oid: Oid) -> Option<Vec<Branch>>
pub fn oids(&self) -> impl Iterator<Item = Oid> + '_
pub fn iter(&self) -> impl Iterator<Item = (Oid, &[Branch])> + '_
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn all(&self) -> Self
pub fn descendants(&self, repo: &dyn Repo, base_oid: Oid) -> Self
pub fn dependents(&self, repo: &dyn Repo, base_oid: Oid, head_oid: Oid) -> Self
pub fn branch(&self, repo: &dyn Repo, base_oid: Oid, head_oid: Oid) -> Self
Trait Implementations§
source§impl IntoIterator for Branches
impl IntoIterator for Branches
source§impl PartialEq<Branches> for Branches
impl PartialEq<Branches> for Branches
impl Eq for Branches
impl StructuralEq for Branches
impl StructuralPartialEq for Branches
Auto Trait Implementations§
impl RefUnwindSafe for Branches
impl Send for Branches
impl Sync for Branches
impl Unpin for Branches
impl UnwindSafe for Branches
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.