pub struct SecondThreshold(/* private fields */);Expand description
Where the context reminder’s second rung sits: a whole percent of the
window, 31 through 90 (the three numbers live in consts_policy).
One construction point, SecondThreshold::parse, so a rung the city
refuses cannot be spelled, and its refusal carries the domain: that is
the only sentence a person editing a CONFIG.toml gets. Why the domain
is bounded is consts_policy::INTERVAL_CAP_BYTES’s derivation.
Implementations§
Source§impl SecondThreshold
impl SecondThreshold
Sourcepub fn parse(raw: u64) -> Result<SecondThreshold, AxError>
pub fn parse(raw: u64) -> Result<SecondThreshold, AxError>
Sole constructor. raw is a whole percent of the window.
§Errors
E_INVALID_ARGS, naming the value and the domain it is outside,
when raw is not 31..=90. Never clamped: a file that states 30
means something its writer has to be told is not accepted.
Trait Implementations§
Source§impl Clone for SecondThreshold
impl Clone for SecondThreshold
impl Copy for SecondThreshold
Source§impl Debug for SecondThreshold
impl Debug for SecondThreshold
Source§impl<'de> Deserialize<'de> for SecondThreshold
impl<'de> Deserialize<'de> for SecondThreshold
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SecondThreshold
Source§impl From<SecondThreshold> for u64
impl From<SecondThreshold> for u64
Source§fn from(rung: SecondThreshold) -> u64
fn from(rung: SecondThreshold) -> u64
Converts to this type from the input type.
Source§impl PartialEq for SecondThreshold
impl PartialEq for SecondThreshold
Source§impl Serialize for SecondThreshold
impl Serialize for SecondThreshold
impl StructuralPartialEq for SecondThreshold
Auto Trait Implementations§
impl Freeze for SecondThreshold
impl RefUnwindSafe for SecondThreshold
impl Send for SecondThreshold
impl Sync for SecondThreshold
impl Unpin for SecondThreshold
impl UnsafeUnpin for SecondThreshold
impl UnwindSafe for SecondThreshold
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more