pub struct TypeSet { /* private fields */ }
Expand description
A typesafe heterogeneous set
Implementations§
Source§impl TypeSet
impl TypeSet
pub fn new() -> Self
pub fn insert<E: 'static>(&mut self, element: E)
pub fn insert_dynamic(&mut self, element: Box<impl Any>)
pub fn contains<E: 'static>(&self) -> bool
pub fn get<E: 'static>(&self) -> Option<&E>
pub fn get_mut<E: 'static>(&mut self) -> Option<&mut E>
pub fn remove<E: 'static>(&mut self) -> Option<E>
pub fn clear(&mut self)
Auto Trait Implementations§
impl Freeze for TypeSet
impl !RefUnwindSafe for TypeSet
impl !Send for TypeSet
impl !Sync for TypeSet
impl Unpin for TypeSet
impl !UnwindSafe for TypeSet
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