pub struct ShapeSet { /* private fields */ }
Expand description
Implementations
sourceimpl ShapeSet
impl ShapeSet
sourcepub fn new(items: impl IntoIterator<Item = Shape>) -> ShapeSet
pub fn new(items: impl IntoIterator<Item = Shape>) -> ShapeSet
Create a new ShapeSet
which includes the specified items.
Exampe
let shape_set = ShapeSet::new(vec![Shape::Named, Shape::Newtype]);
assert!(shape_set.contains(&Shape::Newtype));
sourcepub fn insert_all(&mut self)
pub fn insert_all(&mut self)
sourcepub fn insert(&mut self, shape: Shape)
pub fn insert(&mut self, shape: Shape)
Insert a shape into the set, so that the set will match that shape
Trait Implementations
sourceimpl FromIterator<Shape> for ShapeSet
impl FromIterator<Shape> for ShapeSet
Auto Trait Implementations
impl RefUnwindSafe for ShapeSet
impl Send for ShapeSet
impl Sync for ShapeSet
impl Unpin for ShapeSet
impl UnwindSafe for ShapeSet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more