Trait PairingOptionsSetters
pub trait PairingOptionsSetters: Sized + Holds<PairingOptions> {
// Required methods
fn invitation(self, value: bool) -> Self;
fn pin(self, value: bool) -> Self;
fn pin_shown(self, value: bool) -> Self;
fn device(self, value: bool) -> Self;
fn pin_alphabet(self, value: impl Into<CodeAlphabet>) -> Self;
fn pin_ttl(self, value: impl Into<Option<Duration>>) -> Self;
fn pin_attempts(self, value: u32) -> Self;
fn user_code_alphabet(self, value: impl Into<CodeAlphabet>) -> Self;
fn device_ttl(self, value: impl Into<Option<Duration>>) -> Self;
}Expand description
The typed setters of PairingOptions, for any builder that holds its settings.
Required Methods§
fn invitation(self, value: bool) -> Self
fn invitation(self, value: bool) -> Self
Whether joiners may pair with an invitation. Default true.
fn pin(self, value: bool) -> Self
fn pin(self, value: bool) -> Self
Whether joiners may pair with a PIN (needs the pin feature). Default true.
fn pin_shown(self, value: bool) -> Self
fn pin_shown(self, value: bool) -> Self
Whether a joiner may show a PIN for an operator to type into this side, which holds its
run until the operator answers or pin_ttl passes. Turn it off where nobody is there
to answer. Default true.
fn pin_alphabet(self, value: impl Into<CodeAlphabet>) -> Self
fn pin_alphabet(self, value: impl Into<CodeAlphabet>) -> Self
The alphabet and length of a PIN the desk shows. Default 0123456789 × 6.
fn pin_ttl(self, value: impl Into<Option<Duration>>) -> Self
fn pin_ttl(self, value: impl Into<Option<Duration>>) -> Self
How long a shown PIN, or a slot waiting for a joiner’s PIN, lasts; None (the text
never) lasts for good. Default 10 minutes; it is also the window of
DeskLimits::pin_runs_per_source.
fn pin_attempts(self, value: u32) -> Self
fn pin_attempts(self, value: u32) -> Self
How many runs may try a shown PIN before it is burned; a run counts once it is past the first PAKE message, whatever its outcome. Default 1.
fn user_code_alphabet(self, value: impl Into<CodeAlphabet>) -> Self
fn user_code_alphabet(self, value: impl Into<CodeAlphabet>) -> Self
The alphabet and length of a device-flow user code. Default RFC 8628’s
BCDFGHJKLMNPQRSTVWXZ × 8.
fn device_ttl(self, value: impl Into<Option<Duration>>) -> Self
fn device_ttl(self, value: impl Into<Option<Duration>>) -> Self
How long a user code waits for approval; None (the text never) waits for good.
Default 10 minutes; it is also the window of DeskLimits::wrong_codes_total.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".