[−][src]Struct bounded_registers::bounds::Bounded
A type whose behaviors enforce that its val
member fall with in
the range prescribed by L
(a lower bound) and U
(an upper
bound).
Fields
val: N
Methods
impl<N, L, U> Bounded<N, L, U> where
N: Clone + Copy + PartialOrd,
L: ReifyTo<N>,
U: ReifyTo<N>,
U: IsGreater<L, Output = True>,
[src]
N: Clone + Copy + PartialOrd,
L: ReifyTo<N>,
U: ReifyTo<N>,
U: IsGreater<L, Output = True>,
pub fn new(val: N) -> Option<Self>
[src]
Make a new instance of a bounded value. If L <= val <= U
does not hold, then new
returns None
.
impl<L, U> Bounded<u8, L, U>
[src]
pub const fn checked<V: Unsigned>() -> Self where
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
[src]
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
Compile-type checked value.
impl<L, U> Bounded<u16, L, U>
[src]
pub const fn checked<V: Unsigned>() -> Self where
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
[src]
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
Compile-type checked value.
impl<L, U> Bounded<u32, L, U>
[src]
pub const fn checked<V: Unsigned>() -> Self where
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
[src]
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
Compile-type checked value.
impl<L, U> Bounded<u64, L, U>
[src]
pub const fn checked<V: Unsigned>() -> Self where
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
[src]
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
Compile-type checked value.
impl<L, U> Bounded<usize, L, U>
[src]
pub const fn checked<V: Unsigned>() -> Self where
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
[src]
V: IsLessOrEqual<U, Output = True>,
V: IsGreaterOrEqual<L, Output = True>,
Compile-type checked value.
Trait Implementations
impl<N: Debug, L: Debug, U: Debug> Debug for Bounded<N, L, U>
[src]
impl<N: Copy, L: Copy, U: Copy> Copy for Bounded<N, L, U>
[src]
impl<N: Clone, L: Clone, U: Clone> Clone for Bounded<N, L, U>
[src]
fn clone(&self) -> Bounded<N, L, U>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<N, L, U> Unpin for Bounded<N, L, U> where
L: Unpin,
N: Unpin,
U: Unpin,
L: Unpin,
N: Unpin,
U: Unpin,
impl<N, L, U> Send for Bounded<N, L, U> where
L: Send,
N: Send,
U: Send,
L: Send,
N: Send,
U: Send,
impl<N, L, U> Sync for Bounded<N, L, U> where
L: Sync,
N: Sync,
U: Sync,
L: Sync,
N: Sync,
U: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self