pub struct AllowedRange {
pub min: i64,
pub max: i64,
}Fields§
§min: i64§max: i64Implementations§
Source§impl AllowedRange
impl AllowedRange
pub const fn new(min: i64, max: i64) -> Self
pub const fn no_check() -> Self
Sourcepub const fn from_bit_size(n_bits: usize, sign: Sign) -> Self
pub const fn from_bit_size(n_bits: usize, sign: Sign) -> Self
Note: for the 64-bit size, we actually do signed checks regardless of the sign argument
because the min and max are i64 type
Sourcepub const fn from_byte_size(n_bytes: usize, sign: Sign) -> Self
pub const fn from_byte_size(n_bytes: usize, sign: Sign) -> Self
Note: for the 8-byte size, we actually do signed checks regardless of the sign argument
because the min and max are i64 type
Trait Implementations§
Source§impl Clone for AllowedRange
impl Clone for AllowedRange
Source§fn clone(&self) -> AllowedRange
fn clone(&self) -> AllowedRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AllowedRange
impl Debug for AllowedRange
Source§impl PartialEq for AllowedRange
impl PartialEq for AllowedRange
Source§fn eq(&self, other: &AllowedRange) -> bool
fn eq(&self, other: &AllowedRange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AllowedRange
impl StructuralPartialEq for AllowedRange
Auto Trait Implementations§
impl Freeze for AllowedRange
impl RefUnwindSafe for AllowedRange
impl Send for AllowedRange
impl Sync for AllowedRange
impl Unpin for AllowedRange
impl UnsafeUnpin for AllowedRange
impl UnwindSafe for AllowedRange
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