pub struct AccessKinds { /* private fields */ }Expand description
The combined access kinds of one path.
Combining is a set union: recording the same kind twice changes nothing, and the order in which kinds are recorded does not matter.
Implementations§
Source§impl AccessKinds
impl AccessKinds
Sourcepub const fn only(kind: AccessKind) -> Self
pub const fn only(kind: AccessKind) -> Self
The set that holds only kind.
Sourcepub const fn contains(self, kind: AccessKind) -> bool
pub const fn contains(self, kind: AccessKind) -> bool
Whether the set holds kind.
Sourcepub const fn insert(&mut self, kind: AccessKind)
pub const fn insert(&mut self, kind: AccessKind)
Add kind to the set.
Sourcepub const fn with(self, kind: AccessKind) -> Self
pub const fn with(self, kind: AccessKind) -> Self
The set with kind added.
Sourcepub fn iter(self) -> impl Iterator<Item = AccessKind>
pub fn iter(self) -> impl Iterator<Item = AccessKind>
The kinds in the set, in the order of AccessKind::ALL.
Trait Implementations§
Source§impl BitOr for AccessKinds
impl BitOr for AccessKinds
Source§impl BitOr<AccessKind> for AccessKinds
impl BitOr<AccessKind> for AccessKinds
Source§type Output = AccessKinds
type Output = AccessKinds
The resulting type after applying the
| operator.Source§fn bitor(self, kind: AccessKind) -> Self
fn bitor(self, kind: AccessKind) -> Self
Performs the
| operation. Read moreSource§impl BitOrAssign for AccessKinds
impl BitOrAssign for AccessKinds
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|= operation. Read moreSource§impl BitOrAssign<AccessKind> for AccessKinds
impl BitOrAssign<AccessKind> for AccessKinds
Source§fn bitor_assign(&mut self, kind: AccessKind)
fn bitor_assign(&mut self, kind: AccessKind)
Performs the
|= operation. Read moreSource§impl Clone for AccessKinds
impl Clone for AccessKinds
impl Copy for AccessKinds
Source§impl Debug for AccessKinds
impl Debug for AccessKinds
Source§impl Default for AccessKinds
impl Default for AccessKinds
Source§impl Display for AccessKinds
impl Display for AccessKinds
impl Eq for AccessKinds
Source§impl From<AccessKind> for AccessKinds
impl From<AccessKind> for AccessKinds
Source§fn from(kind: AccessKind) -> Self
fn from(kind: AccessKind) -> Self
Converts to this type from the input type.
Source§impl FromIterator<AccessKind> for AccessKinds
impl FromIterator<AccessKind> for AccessKinds
Source§fn from_iter<I: IntoIterator<Item = AccessKind>>(kinds: I) -> Self
fn from_iter<I: IntoIterator<Item = AccessKind>>(kinds: I) -> Self
Creates a value from an iterator. Read more
Source§impl Hash for AccessKinds
impl Hash for AccessKinds
Source§impl Ord for AccessKinds
impl Ord for AccessKinds
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 PartialEq for AccessKinds
impl PartialEq for AccessKinds
Source§impl PartialOrd for AccessKinds
impl PartialOrd for AccessKinds
impl StructuralPartialEq for AccessKinds
Auto Trait Implementations§
impl Freeze for AccessKinds
impl RefUnwindSafe for AccessKinds
impl Send for AccessKinds
impl Sync for AccessKinds
impl Unpin for AccessKinds
impl UnsafeUnpin for AccessKinds
impl UnwindSafe for AccessKinds
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