Struct range_checked::U16Bounded
source · pub struct U16Bounded<const LO: u16, const HI: u16, const INCLUSIVE: bool>(/* private fields */);Expand description
Implements the TryFrom type, which attempts to convert to the contained type, returning an error if the input is out of bounds.
This type also implements [Deref] into the contained type.
Implementations§
Methods from Deref<Target = u16>§
pub const MIN: u16 = 0u16
pub const MAX: u16 = 65_535u16
pub const BITS: u32 = 16u32
Trait Implementations§
source§impl<const LO: u16, const HI: u16, const INCLUSIVE: bool> Deref for U16Bounded<LO, HI, INCLUSIVE>
impl<const LO: u16, const HI: u16, const INCLUSIVE: bool> Deref for U16Bounded<LO, HI, INCLUSIVE>
Auto Trait Implementations§
impl<const LO: u16, const HI: u16, const INCLUSIVE: bool> RefUnwindSafe for U16Bounded<LO, HI, INCLUSIVE>
impl<const LO: u16, const HI: u16, const INCLUSIVE: bool> Send for U16Bounded<LO, HI, INCLUSIVE>
impl<const LO: u16, const HI: u16, const INCLUSIVE: bool> Sync for U16Bounded<LO, HI, INCLUSIVE>
impl<const LO: u16, const HI: u16, const INCLUSIVE: bool> Unpin for U16Bounded<LO, HI, INCLUSIVE>
impl<const LO: u16, const HI: u16, const INCLUSIVE: bool> UnwindSafe for U16Bounded<LO, HI, INCLUSIVE>
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