pub struct u16Word(pub [u8; 2]);
Expand description
Fixed length byte array.
Tuple Fields§
§0: [u8; 2]
Implementations§
Source§impl u16Word
impl u16Word
pub fn from_slice<A: SeqTrait<u8>>(input: &A, start: usize, len: usize) -> Self
pub fn concat<A: SeqTrait<u8>>(&self, next: &A) -> Seq<u8>
pub fn from_slice_range<A: SeqTrait<u8>>(input: &A, r: Range<usize>) -> Self
pub fn slice(&self, start_out: usize, len: usize) -> Seq<u8>
pub fn slice_range(&self, r: Range<usize>) -> Seq<u8>
pub fn num_chunks(&self, chunk_size: usize) -> usize
pub fn get_chunk_len(&self, chunk_size: usize, chunk_number: usize) -> usize
pub fn get_chunk( &self, chunk_size: usize, chunk_number: usize, ) -> (usize, Seq<u8>)
pub fn set_chunk<A: SeqTrait<u8>>( self, chunk_size: usize, chunk_number: usize, input: &A, ) -> Self
Source§impl u16Word
impl u16Word
pub fn to_be_u32s(&self) -> Seq<u32>
pub fn to_le_u32s(&self) -> Seq<u32>
pub fn to_be_u64s(&self) -> Seq<u64>
pub fn to_le_u64s(&self) -> Seq<u64>
pub fn to_u128s_be(&self) -> Seq<u128>
pub fn to_u128s_le(&self) -> Seq<u128>
pub fn to_hex(&self) -> String
Trait Implementations§
Source§impl ModNumeric for u16Word
impl ModNumeric for u16Word
Source§fn mul_mod(self, rhs: Self, n: Self) -> Self
fn mul_mod(self, rhs: Self, n: Self) -> Self
(self * rhs) % n
(coefficient-wise)
Note that the multiplication is wrapping.
Source§fn pow_mod(self, exp: Self, n: Self) -> Self
fn pow_mod(self, exp: Self, n: Self) -> Self
(self ^ exp) % n
(coefficient-wise)
Note that the exponentiation is wrapping.
Source§fn signed_modulo(self, n: Self) -> Self
fn signed_modulo(self, n: Self) -> Self
self % n
(coefficient-wise)
Source§impl Numeric for u16Word
impl Numeric for u16Word
fn equal(self, _other: Self) -> bool
fn greater_than(self, _other: Self) -> bool
fn greater_than_or_equal(self, _other: Self) -> bool
fn less_than(self, _other: Self) -> bool
fn less_than_or_equal(self, _other: Self) -> bool
fn not_equal_bm(self, _other: Self) -> Self
fn equal_bm(self, _other: Self) -> Self
fn greater_than_bm(self, _other: Self) -> Self
fn greater_than_or_equal_bm(self, _other: Self) -> Self
fn less_than_bm(self, _other: Self) -> Self
fn less_than_or_equal_bm(self, _other: Self) -> Self
Source§impl Ord for u16Word
impl Ord for u16Word
Source§impl PartialOrd for u16Word
impl PartialOrd for u16Word
Source§impl SeqTrait<u8> for u16Word
impl SeqTrait<u8> for u16Word
fn create(x: usize) -> Self
fn len(&self) -> usize
fn iter(&self) -> Iter<'_, u8>
Source§fn update_slice<A: SeqTrait<u8>>(
self,
start_out: usize,
v: &A,
start_in: usize,
len: usize,
) -> Self
fn update_slice<A: SeqTrait<u8>>( self, start_out: usize, v: &A, start_in: usize, len: usize, ) -> Self
fn update_start<A: SeqTrait<u8>>(self, v: &A) -> Self
impl Copy for u16Word
impl Eq for u16Word
impl NumericCopy for u16Word
Auto Trait Implementations§
impl Freeze for u16Word
impl RefUnwindSafe for u16Word
impl Send for u16Word
impl Sync for u16Word
impl Unpin for u16Word
impl UnwindSafe for u16Word
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