Struct hazardflow_designs::std::value::S
source · pub struct S<const N: usize>(/* private fields */);
Expand description
An signed integer with bitwidth N
.
Implementations§
source§impl<const N: usize> S<N>
impl<const N: usize> S<N>
sourcepub fn resize<const M: usize>(self) -> S<M>
pub fn resize<const M: usize>(self) -> S<M>
Resizes the bitwidth.
It does not preserves the signedness.
sourcepub fn signed_max() -> S<N>
pub fn signed_max() -> S<N>
Returns the maximum value of an N
bit signed value. (i.e., 2^(N
- 1) - 1)
sourcepub fn signed_min() -> S<N>
pub fn signed_min() -> S<N>
Returns the minimum value of an N
bit unsigned value. (i.e., -2^(N
- 1))
Trait Implementations§
impl<const N: usize> Copy for S<N>
Auto Trait Implementations§
impl<const N: usize> RefUnwindSafe for S<N>
impl<const N: usize> Send for S<N>
impl<const N: usize> Sync for S<N>
impl<const N: usize> Unpin for S<N>
impl<const N: usize> UnwindSafe for S<N>
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