PrioritySet

Struct PrioritySet 

Source
pub struct PrioritySet(/* private fields */);
Expand description

A set of priority values

Note that higher priority has a lower numerical value and is ordered first. Methods are named according to numerical priority values, e.g., new_ge(Priority::Nominal) returns a set containing Nominal, Low, Slow, and Optional.

Implementations§

Source§

impl PrioritySet

Source

pub const NONE: Self

Source

pub const ALL: Self

Source

pub const fn from_bits(bits: u8) -> Self

Source

pub const fn into_bits(self) -> u8

Source

pub const fn complement(self) -> Self

Source

pub const fn new_eq(priority: Priority) -> Self

Source

pub const fn new_ge(priority: Priority) -> Self

Source

pub const fn new_le(priority: Priority) -> Self

Source

pub const fn new_gt(priority: Priority) -> Self

Source

pub const fn new_lt(priority: Priority) -> Self

Source

pub const fn contains(&self, priority: Priority) -> bool

Source

pub const fn insert(&mut self, priority: Priority)

Source

pub const fn remove(&mut self, priority: Priority)

Source

pub const fn first(&self) -> Option<Priority>

Source

pub const fn last(&self) -> Option<Priority>

Source

pub const fn is_empty(&self) -> bool

Trait Implementations§

Source§

impl BitAnd for PrioritySet

Source§

type Output = PrioritySet

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: PrioritySet) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for PrioritySet

Source§

fn bitand_assign(&mut self, rhs: PrioritySet)

Performs the &= operation. Read more
Source§

impl BitOr for PrioritySet

Source§

type Output = PrioritySet

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: PrioritySet) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for PrioritySet

Source§

fn bitor_assign(&mut self, rhs: PrioritySet)

Performs the |= operation. Read more
Source§

impl Clone for PrioritySet

Source§

fn clone(&self) -> PrioritySet

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PrioritySet

Source§

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

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

impl Default for PrioritySet

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl IntoIterator for PrioritySet

Source§

type Item = Priority

The type of the elements being iterated over.
Source§

type IntoIter = PrioritySetIterator

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

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl Not for PrioritySet

Source§

type Output = PrioritySet

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl PartialEq for PrioritySet

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for PrioritySet

Source§

impl Eq for PrioritySet

Source§

impl StructuralPartialEq for PrioritySet

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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.
§

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

Performs the conversion.