pub struct Dfb(/* private fields */);Expand description
An “anymap” which uses TypeIDs as keys and VecDeques of that type as values.
Implementations§
Source§impl Dfb
impl Dfb
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a Dfb backed by HashMap::new
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a Dfb backed by HashMap::with_capacity
Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Wrapper for HashMap::capacity
Sourcepub fn values_mut(&mut self) -> ValuesMut<'_, TypeId, VecDeque<Box<dyn Any>>>
pub fn values_mut(&mut self) -> ValuesMut<'_, TypeId, VecDeque<Box<dyn Any>>>
Wrapper for HashMap::values_mut
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, TypeId, VecDeque<Box<dyn Any>>>
pub fn iter_mut(&mut self) -> IterMut<'_, TypeId, VecDeque<Box<dyn Any>>>
Wrapper for HashMap::iter_mut
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Wrapper for HashMap::len
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Wrapper for HashMap::is_empty
Sourcepub fn drain(&mut self) -> Drain<'_, TypeId, VecDeque<Box<dyn Any>>>
pub fn drain(&mut self) -> Drain<'_, TypeId, VecDeque<Box<dyn Any>>>
Wrapper for HashMap::drain
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Wrapper for HashMap::clear
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Wrapper for HashMap::reserve
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Wrapper for HashMap::shrink_to_fit
Sourcepub fn entry<T: 'static>(&mut self) -> Entry<'_, TypeId, VecDeque<Box<dyn Any>>>
pub fn entry<T: 'static>(&mut self) -> Entry<'_, TypeId, VecDeque<Box<dyn Any>>>
Generic wrapper for HashMap::entry
Sourcepub fn contains<T: Any>(&self) -> bool
pub fn contains<T: Any>(&self) -> bool
Generic wrapper for HashMap::get_key_value
Sourcepub fn insert(&mut self, value: impl Any)
pub fn insert(&mut self, value: impl Any)
Generic wrapper for HashMap::insert. If one or more values of this type already exist in the map, this will push a new value into the FIFO that contains them. If no value exists, this will create a new FIFO containing the inserted element.
Sourcepub fn insert_dyn(&mut self, value: Box<dyn Any>)
pub fn insert_dyn(&mut self, value: Box<dyn Any>)
Like Dfb::insert, but allows boxed values of unknown type.
Sourcepub fn remove<T: Any>(&mut self) -> Option<T>
pub fn remove<T: Any>(&mut self) -> Option<T>
Generic wrapper for HashMap::remove. Returns and removes the earliest inserted element of this type if it exists. If the element returned was the last remaining element of its type, the internal FIFO for this type is deleted.
Trait Implementations§
Source§impl Extend<(TypeId, VecDeque<Box<dyn Any>>)> for Dfb
impl Extend<(TypeId, VecDeque<Box<dyn Any>>)> for Dfb
Source§fn extend<T: IntoIterator<Item = (TypeId, VecDeque<Box<dyn Any>>)>>(
&mut self,
iter: T,
)
fn extend<T: IntoIterator<Item = (TypeId, VecDeque<Box<dyn Any>>)>>( &mut self, iter: T, )
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)