Struct memfile::Seals

source ·
pub struct Seals { /* private fields */ }
Expand description

A set of seals.

Implementations§

source§

impl Seals

source

pub const fn from_bits_truncate(bits: u32) -> Self

Construct a set of seals from a bitmask.

Unknown bits are trunctated.

source

pub const fn bits(self) -> u32

source

pub const fn empty() -> Self

Get an empty set of seals.

source

pub const fn all() -> Self

Get a set of seals containing all possible seals.

source

pub const fn len(self) -> usize

Get the number of seals in the set.

source

pub const fn is_empty(self) -> bool

Check if the set of seals is empty.

source

pub const fn is_all(self) -> bool

Check if the set of seals contains all possible seals.

source

pub fn contains(self, other: impl Into<Self>) -> bool

Check if the set of seals contains all the given seals.

source

pub fn intersects(self, other: impl Into<Self>) -> bool

Check if the set of seals contains at least one of the given seals.

source

pub fn iter(&self) -> SealsIterator

Iterate over the seals in the set.

Trait Implementations§

source§

impl BitAnd<Seals> for Seal

§

type Output = Seals

The resulting type after applying the & operator.
source§

fn bitand(self, right: Seals) -> Seals

Performs the & operation. Read more
source§

impl<T: Into<Seals>> BitAnd<T> for Seals

§

type Output = Seals

The resulting type after applying the & operator.
source§

fn bitand(self, right: T) -> Self

Performs the & operation. Read more
source§

impl<T: Into<Seals>> BitAndAssign<T> for Seals

source§

fn bitand_assign(&mut self, right: T)

Performs the &= operation. Read more
source§

impl BitOr<Seals> for Seal

§

type Output = Seals

The resulting type after applying the | operator.
source§

fn bitor(self, right: Seals) -> Seals

Performs the | operation. Read more
source§

impl<T: Into<Seals>> BitOr<T> for Seals

§

type Output = Seals

The resulting type after applying the | operator.
source§

fn bitor(self, right: T) -> Self

Performs the | operation. Read more
source§

impl<T: Into<Seals>> BitOrAssign<T> for Seals

source§

fn bitor_assign(&mut self, right: T)

Performs the |= operation. Read more
source§

impl BitXor<Seals> for Seal

§

type Output = Seals

The resulting type after applying the ^ operator.
source§

fn bitxor(self, right: Seals) -> Seals

Performs the ^ operation. Read more
source§

impl<T: Into<Seals>> BitXor<T> for Seals

§

type Output = Seals

The resulting type after applying the ^ operator.
source§

fn bitxor(self, right: T) -> Self

Performs the ^ operation. Read more
source§

impl<T: Into<Seals>> BitXorAssign<T> for Seals

source§

fn bitxor_assign(&mut self, right: T)

Performs the ^= operation. Read more
source§

impl Clone for Seals

source§

fn clone(&self) -> Seals

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Seals

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Seal> for Seals

source§

fn from(other: Seal) -> Self

Converts to this type from the input type.
source§

impl Hash for Seals

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoIterator for &Seals

§

type Item = Seal

The type of the elements being iterated over.
§

type IntoIter = SealsIterator

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> SealsIterator

Creates an iterator from a value. Read more
source§

impl IntoIterator for Seals

§

type Item = Seal

The type of the elements being iterated over.
§

type IntoIter = SealsIterator

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> SealsIterator

Creates an iterator from a value. Read more
source§

impl Not for Seals

§

type Output = Seals

The resulting type after applying the ! operator.
source§

fn not(self) -> Seals

Performs the unary ! operation. Read more
source§

impl Ord for Seals

source§

fn cmp(&self, other: &Seals) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Seals

source§

fn eq(&self, other: &Seals) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Seals

source§

fn partial_cmp(&self, other: &Seals) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Sub<Seals> for Seal

§

type Output = Seals

The resulting type after applying the - operator.
source§

fn sub(self, right: Seals) -> Seals

Performs the - operation. Read more
source§

impl<T: Into<Seals>> Sub<T> for Seals

§

type Output = Seals

The resulting type after applying the - operator.
source§

fn sub(self, right: T) -> Self

Performs the - operation. Read more
source§

impl<T: Into<Seals>> SubAssign<T> for Seals

source§

fn sub_assign(&mut self, right: T)

Performs the -= operation. Read more
source§

impl Copy for Seals

source§

impl Eq for Seals

source§

impl StructuralEq for Seals

source§

impl StructuralPartialEq for Seals

Auto Trait Implementations§

§

impl RefUnwindSafe for Seals

§

impl Send for Seals

§

impl Sync for Seals

§

impl Unpin for Seals

§

impl UnwindSafe for Seals

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.