pub struct ShapeSet { /* private fields */ }
Expand description
Implementations§
source§impl 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§
Auto Trait Implementations§
impl Freeze for ShapeSet
impl RefUnwindSafe for ShapeSet
impl Send for ShapeSet
impl Sync for ShapeSet
impl Unpin for ShapeSet
impl UnwindSafe for ShapeSet
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)