Skip to main content

DispositionSet

Struct DispositionSet 

Source
pub struct DispositionSet<Set: KindSet> { /* private fields */ }
Expand description

A disposition for every declared kind of one set, in declaration order.

The rows are private and the only public constructor checks every name and the complete row count against KindSet::NAMES, so an omitted, doubled, foreign, or reordered seat cannot become this value and cannot be seated beside an expansion.

Implementations§

Source§

impl<Set: KindSet> DispositionSet<Set>

Source

pub fn complete(record: Set::Dispositions) -> Result<Self, DispositionSetError>

Check one set’s disposition record and seal it as complete.

§Errors

Returns DispositionSetError::CountMismatch when the record surrenders fewer or more dispositions than KindSet::NAMES declares. Returns DispositionSetError::KindMismatch when a surrendered row names a kind other than the kind declared at that position. Nothing is truncated, padded, or inferred: silence remains unable to enter an account.

Source

pub const fn len(&self) -> usize

The number of disposition rows, equal to this set’s declared-name count by construction.

Source

pub const fn is_empty(&self) -> bool

Whether this complete set has no declared kinds and therefore no disposition rows.

Source

pub fn iter( &self, ) -> impl ExactSizeIterator<Item = (&'static str, &Disposition)>

Every declared kind name paired with its disposition, in declaration order.

Trait Implementations§

Source§

impl<Set: Clone + KindSet> Clone for DispositionSet<Set>

Source§

fn clone(&self) -> DispositionSet<Set>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<Set: Debug + KindSet> Debug for DispositionSet<Set>

Source§

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

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

impl<Set: Eq + KindSet> Eq for DispositionSet<Set>

Source§

impl<Set: PartialEq + KindSet> PartialEq for DispositionSet<Set>

Source§

fn eq(&self, other: &DispositionSet<Set>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl<Set: PartialEq + KindSet> StructuralPartialEq for DispositionSet<Set>

Auto Trait Implementations§

§

impl<Set> Freeze for DispositionSet<Set>
where PhantomData<fn() -> Set>: Freeze,

§

impl<Set> RefUnwindSafe for DispositionSet<Set>
where PhantomData<fn() -> Set>: RefUnwindSafe,

§

impl<Set> Send for DispositionSet<Set>
where PhantomData<fn() -> Set>: Send,

§

impl<Set> Sync for DispositionSet<Set>
where PhantomData<fn() -> Set>: Sync,

§

impl<Set> Unpin for DispositionSet<Set>
where PhantomData<fn() -> Set>: Unpin,

§

impl<Set> UnsafeUnpin for DispositionSet<Set>
where PhantomData<fn() -> Set>: UnsafeUnpin,

§

impl<Set> UnwindSafe for DispositionSet<Set>
where PhantomData<fn() -> Set>: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

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
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,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.