pub struct DirSet(/* private fields */);Expand description
A set of Directions, such as the directions a port may be left in.
Implementations§
Source§impl DirSet
impl DirSet
Sourcepub const RIGHT: Self
pub const RIGHT: Self
Only Direction::Right.
Sourcepub const UP: Self
pub const UP: Self
Only Direction::Up.
Sourcepub const LEFT: Self
pub const LEFT: Self
Only Direction::Left.
Sourcepub const DOWN: Self
pub const DOWN: Self
Only Direction::Down.
Sourcepub fn iter(self) -> impl Iterator<Item = Direction>
pub fn iter(self) -> impl Iterator<Item = Direction>
The directions in the set, in the order of Direction::ALL.
Trait Implementations§
Source§impl BitOrAssign for DirSet
impl BitOrAssign for DirSet
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreimpl Copy for DirSet
impl Eq for DirSet
Source§impl Ord for DirSet
impl Ord for DirSet
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DirSet
impl PartialOrd for DirSet
impl StructuralPartialEq for DirSet
Auto Trait Implementations§
impl Forget for DirSet
impl Freeze for DirSet
impl Move for DirSet
impl RefUnwindSafe for DirSet
impl Send for DirSet
impl Sync for DirSet
impl Unpin for DirSet
impl UnsafeUnpin for DirSet
impl UnwindSafe for DirSet
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