pub struct BranchSet { /* private fields */ }
Implementations§
source§impl BranchSet
impl BranchSet
pub fn new() -> Self
pub fn insert(&mut self, branch: Branch) -> Option<Branch>
pub fn remove(&mut self, oid: Oid) -> Option<Vec<Branch>>
pub fn contains_oid(&self, oid: Oid) -> bool
pub fn get(&self, oid: Oid) -> Option<&[Branch]>
pub fn get_mut(&mut self, oid: Oid) -> Option<&mut [Branch]>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = (Oid, &[Branch])> + '_
pub fn oids(&self) -> impl Iterator<Item = Oid> + '_
Trait Implementations§
source§impl Extend<Branch> for BranchSet
impl Extend<Branch> for BranchSet
source§fn extend<T: IntoIterator<Item = Branch>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Branch>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl IntoIterator for BranchSet
impl IntoIterator for BranchSet
Auto Trait Implementations§
impl RefUnwindSafe for BranchSet
impl Send for BranchSet
impl Sync for BranchSet
impl Unpin for BranchSet
impl UnwindSafe for BranchSet
Blanket Implementations§
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 + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, 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>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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.