Skip to main content

PairingDeskBuilder

Struct PairingDeskBuilder 

pub struct PairingDeskBuilder
where PairingDeskSettings: Describe,
{ /* private fields */ }
Expand description

Builds a PairingDesk from its settings, filled in layers, and the inputs it takes. build lists everything still missing at once.

Implementations§

§

impl PairingDeskBuilder

pub fn options(self, value: impl Into<PairingOptions>) -> PairingDeskBuilder

What the desk offers and how its codes are made.

pub fn limits(self, value: impl Into<DeskLimits>) -> PairingDeskBuilder

The bounds on pending work and on guessing.

§

impl PairingDeskBuilder
where PairingDeskSettings: Describe,

pub fn random(self, value: impl Into<Random>) -> PairingDeskBuilder

Sets the input random; the last call wins.

pub fn clock(self, value: impl Into<Clock>) -> PairingDeskBuilder

Sets the input clock; the last call wins.

pub fn fill(self, partial: Partial<PairingDeskSettings>) -> PairingDeskBuilder

Lays partial over what is set: only the keys it sets are taken, and the last write of a key wins.

pub fn fill_from( self, source: &mut impl Source, ) -> Result<PairingDeskBuilder, FillError>

Fills the settings from source, in turn after what is already set. The keys the source holds that the settings lack are dropped; to see them, fill a Partial and pass it to fill.

§Errors

The FillError that Partial::fill_from gives.

pub fn parts(self) -> Result<PairingDeskParts, Missing>

The parts: the settings built, every required input present and every optional input as given. A second terminal (one that builds a different value from the same parts) is written over this.

§Errors

Everything that is missing, at once: the same Missing that build gives.

pub fn build( self, ) -> Result<PairingDesk, BuildError<<PairingDesk as TryFrom<PairingDeskParts>>::Error>>

The built value, or everything that is missing: every required setting and every required input, at once.

§Errors

What is missing, or for a fallible build the error of the conversion.

§

impl PairingDeskBuilder
where PairingDeskSettings: Describe,

pub fn non_defaults(&self) -> Vec<NonDefault>

Every setting that differs from its default, as the builder would build it.

Trait Implementations§

§

impl Configured for PairingDeskBuilder
where PairingDeskSettings: Describe,

§

type Settings = PairingDeskSettings

The type of the settings.
§

fn configured(&self) -> &dyn Inspect

The settings, read through [Inspect].
§

fn non_defaults(&self) -> Vec<NonDefault>

Every setting that differs from its default.
§

impl Debug for PairingDeskBuilder
where PairingDeskSettings: Describe,

§

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

Formats the value using the given formatter. Read more
§

impl From<Partial<PairingDeskSettings>> for PairingDeskBuilder
where PairingDeskSettings: Describe,

§

fn from(partial: Partial<PairingDeskSettings>) -> PairingDeskBuilder

Converts to this type from the input type.
§

impl Holds<PairingDeskSettings> for PairingDeskBuilder
where PairingDeskSettings: Describe,

§

fn partial_mut(&mut self) -> &mut Partial<PairingDeskSettings>

The settings being filled.

Auto Trait Implementations§

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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.

§

impl<__B> PairingDeskSettingsSetters for __B
where __B: Holds<PairingDeskSettings>,

§

fn options(self, value: impl Into<PairingOptions>) -> __B

What the desk offers and how its codes are made.
§

fn limits(self, value: impl Into<DeskLimits>) -> __B

The bounds on pending work and on guessing.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.