pub struct PublicSeq<T: Default + PublicInteger> { /* private fields */ }
Expand description
Variable length byte arrays.
Implementations§
Source§impl<T: Clone + Default + PublicInteger> PublicSeq<T>
impl<T: Clone + Default + PublicInteger> PublicSeq<T>
pub fn new(l: usize) -> Self
pub fn with_capacity(l: usize) -> Self
pub fn reserve(self, additional: usize) -> Self
pub fn slice(&self, start_out: usize, len: usize) -> Self
pub fn native_slice(&self) -> &[T]
pub fn into_slice(self, start_out: usize, len: usize) -> Self
pub fn slice_range(&self, r: Range<usize>) -> Self
pub fn into_slice_range(self, r: Range<usize>) -> Self
pub fn split_off(self, at: usize) -> (Self, Self)
pub fn pop(self) -> (T, Self)
pub fn truncate(self, len: usize) -> Self
pub fn from_slice<A: SeqTrait<T>>(input: &A, start: usize, len: usize) -> Self
pub fn concat<A: SeqTrait<T>>(&self, next: &A) -> Self
pub fn concat_owned(self, next: Self) -> Self
pub fn push(&self, next: &T) -> Self
pub fn push_owned(self, next: T) -> Self
pub fn from_slice_range<A: SeqTrait<T>>(input: &A, r: Range<usize>) -> Self
pub fn num_chunks(&self, chunk_size: usize) -> usize
Sourcepub fn num_exact_chunks(&self, chunk_size: usize) -> usize
pub fn num_exact_chunks(&self, chunk_size: usize) -> usize
Get the number of chunks of chunk_size
in this array.
There might be less than chunk_size
remaining elements in this
array beyond these.
pub fn get_chunk(&self, chunk_size: usize, chunk_number: usize) -> (usize, Self)
Sourcepub fn get_exact_chunk(&self, chunk_size: usize, chunk_number: usize) -> Self
pub fn get_exact_chunk(&self, chunk_size: usize, chunk_number: usize) -> Self
Get the chunk_number
chunk of chunk_size
from this array
as Seq<T>
.
The resulting sequence is of exactly chunk_size
length.
Until #84 is fixed this returns an empty sequence if not enough
elements are left.
Sourcepub fn get_remainder_chunk(&self, chunk_size: usize) -> Self
pub fn get_remainder_chunk(&self, chunk_size: usize) -> Self
Get the remaining chunk of this array of length less than
chunk_size
.
If there’s no remainder, i.e. if the length of this array can
be divided by chunk_size
without a remainder, the function
returns an empty sequence (until #84 is fixed).
pub fn set_chunk<A: SeqTrait<T>>( self, chunk_size: usize, chunk_number: usize, input: &A, ) -> Self
pub fn set_exact_chunk<A: SeqTrait<T>>( self, chunk_size: usize, chunk_number: usize, input: &A, ) -> Self
pub fn update_owned(self, start_out: usize, v: Self) -> Self
Trait Implementations§
Source§impl<T: Numeric + PublicInteger + Copy> ModNumeric for PublicSeq<T>
impl<T: Numeric + PublicInteger + Copy> ModNumeric for PublicSeq<T>
Source§fn signed_modulo(self, _n: Self) -> Self
fn signed_modulo(self, _n: Self) -> Self
self % n
that always returns a positive integerSource§impl<T: Numeric + PublicInteger + Copy> Mul for PublicSeq<T>
Polynomial multiplication on ℤ[x]
impl<T: Numeric + PublicInteger + Copy> Mul for PublicSeq<T>
Polynomial multiplication on ℤ[x]
Source§impl<T: Numeric + PublicInteger + Copy> Numeric for PublicSeq<T>
impl<T: Numeric + PublicInteger + Copy> Numeric for PublicSeq<T>
fn wrap_add(self, rhs: Self) -> Self
fn wrap_sub(self, rhs: Self) -> Self
fn wrap_mul(self, rhs: Self) -> Self
fn wrap_div(self, rhs: Self) -> Self
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<T: Clone + Default + PublicInteger> SeqTrait<T> for PublicSeq<T>
impl<T: Clone + Default + PublicInteger> SeqTrait<T> for PublicSeq<T>
fn len(&self) -> usize
fn iter(&self) -> Iter<'_, T>
Source§fn update_slice<A: SeqTrait<T>>(
self,
start_out: usize,
v: &A,
start_in: usize,
len: usize,
) -> Self
fn update_slice<A: SeqTrait<T>>( self, start_out: usize, v: &A, start_in: usize, len: usize, ) -> Self
fn update_start<A: SeqTrait<T>>(self, v: &A) -> Self
impl<T: Copy + Default + PartialEq + PublicInteger> Eq for PublicSeq<T>
Auto Trait Implementations§
impl<T> Freeze for PublicSeq<T>
impl<T> RefUnwindSafe for PublicSeq<T>where
T: RefUnwindSafe,
impl<T> Send for PublicSeq<T>where
T: Send,
impl<T> Sync for PublicSeq<T>where
T: Sync,
impl<T> Unpin for PublicSeq<T>where
T: Unpin,
impl<T> UnwindSafe for PublicSeq<T>where
T: UnwindSafe,
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