pub struct Range {
pub min: u32,
pub max: u32,
}Expand description
A min/max range for numeric printer capabilities (e.g., speed, darkness).
Invariant: min <= max.
Prefer Range::new or Range::try_new to construct a Range with
automatic invariant checking. Direct struct-literal construction is still
possible for convenience (e.g. in tests or serde), but callers must uphold
the invariant themselves; load_profile_from_str validates it for
deserialized profiles.
Fields§
§min: u32Lower bound (inclusive).
max: u32Upper bound (inclusive).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Range
impl<'de> Deserialize<'de> for Range
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 Range
impl StructuralPartialEq for Range
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnwindSafe for Range
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