Skip to main content

WaitingQueueBuilder

Struct WaitingQueueBuilder 

Source
pub struct WaitingQueueBuilder
where WaitingSettings: Describe,
{ /* private fields */ }
Expand description

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

Implementations§

Source§

impl WaitingQueueBuilder
where Self: Holds<WaitingSettings>,

Source

pub fn limits(self, value: impl Into<WaitingLimits>) -> Self

The bounds on entries. Default WaitingLimits::default.

Source

pub fn ipv6_prefix(self, value: u8) -> Self

The IPv6 prefix length sources are grouped by: 64, since one holder controls every address of a /64. 128 counts each address alone, which lets the holder of a subnet fill the queue; values above 128 are 128. IPv4 sources, IPv4-mapped IPv6 ones included, count per address.

Source

pub fn when_full(self, value: impl Into<WhenFull>) -> Self

What a source at its limit does with a newcomer. Default WhenFull::Refuse, so that strangers sharing a source cannot flush those already waiting.

Source

pub fn record_interval(self, value: impl Into<Duration>) -> Self

The least time between two new records from one source, each record being a synced write a stranger can cause. Default DEFAULT_RECORD_INTERVAL; zero is no limit.

Source§

impl WaitingQueueBuilder
where WaitingSettings: Describe,

Source

pub fn fill(self, partial: Partial<WaitingSettings>) -> Self

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

Source

pub fn fill_from(self, source: &mut impl Source) -> Result<Self, 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.

Source

pub fn parts(self) -> Result<WaitingQueueParts, 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.

Source

pub fn build(self) -> Result<WaitingQueue, Missing>

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.

Source§

impl WaitingQueueBuilder
where WaitingSettings: Describe,

Source

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

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

Trait Implementations§

Source§

impl Check<WaitingQueueBuilder> for Profile
where WaitingSettings: Describe,

Source§

fn check(&self, subject: &WaitingQueueBuilder, report: &mut Report)

Judges subject, pushing a Finding per expectation.
Source§

impl Configured for WaitingQueueBuilder
where WaitingSettings: Describe,

Source§

type Settings = WaitingSettings

The type of the settings.
Source§

fn configured(&self) -> &dyn Inspect

The settings, read through [Inspect].
§

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

Every setting that differs from its default.
Source§

impl Debug for WaitingQueueBuilder
where WaitingSettings: Describe,

Source§

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

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

impl From<Partial<WaitingSettings>> for WaitingQueueBuilder
where WaitingSettings: Describe,

Source§

fn from(partial: Partial<WaitingSettings>) -> Self

Converts to this type from the input type.
Source§

impl Holds<WaitingSettings> for WaitingQueueBuilder
where WaitingSettings: Describe,

Source§

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

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

impl<__B> WaitingSettingsSetters for __B
where __B: Holds<WaitingSettings>,

Source§

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

The bounds on entries. Default WaitingLimits::default.
Source§

fn ipv6_prefix(self, value: u8) -> __B

The IPv6 prefix length sources are grouped by: 64, since one holder controls every address of a /64. 128 counts each address alone, which lets the holder of a subnet fill the queue; values above 128 are 128. IPv4 sources, IPv4-mapped IPv6 ones included, count per address.
Source§

fn when_full(self, value: impl Into<WhenFull>) -> __B

What a source at its limit does with a newcomer. Default WhenFull::Refuse, so that strangers sharing a source cannot flush those already waiting.
Source§

fn record_interval(self, value: impl Into<Duration>) -> __B

The least time between two new records from one source, each record being a synced write a stranger can cause. Default DEFAULT_RECORD_INTERVAL; zero is no limit.