Struct trk_io::ArraySequence
source · [−]Fields
offsets: Vec<usize>
data: Vec<T>
Implementations
sourceimpl<T> ArraySequence<T>
impl<T> ArraySequence<T>
pub fn empty() -> ArraySequence<T>
pub fn with_capacity(n: usize) -> ArraySequence<T>
pub fn new(lengths: Vec<usize>, data: Vec<T>) -> ArraySequence<T>
pub fn push(&mut self, val: T)
pub fn nb_push_done(&self) -> usize
pub fn end_push(&mut self)
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if the array contains no elements.
The array will be considered non empty if there was one or more
push()
, even without an end_push()
. Use len()
instead to ignore
all pushed elements.
pub fn len(&self) -> usize
sourcepub fn length_of_array(&self, i: usize) -> usize
pub fn length_of_array(&self, i: usize) -> usize
Same as obj[i].len(), without building a slice
pub fn filter<P>(&self, predicate: &mut P) -> ArraySequence<T> where
P: FnMut(&[T]) -> bool,
T: Clone,
pub fn iter(&self) -> ArraySequenceIterator<'_, T>
pub fn iter_mut(&mut self) -> ArraySequenceIteratorMut<'_, T>
sourceimpl<T: Clone> ArraySequence<T>
impl<T: Clone> ArraySequence<T>
pub fn extend_from_slice(&mut self, other: &[T])
Trait Implementations
sourceimpl<T: Clone> Clone for ArraySequence<T>
impl<T: Clone> Clone for ArraySequence<T>
sourcefn clone(&self) -> ArraySequence<T>
fn clone(&self) -> ArraySequence<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T> Default for ArraySequence<T>
impl<T> Default for ArraySequence<T>
sourceimpl<T> Extend<T> for ArraySequence<T>
impl<T> Extend<T> for ArraySequence<T>
sourcefn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<T> Index<usize> for ArraySequence<T>
impl<T> Index<usize> for ArraySequence<T>
sourceimpl<'a, T> IntoIterator for &'a ArraySequence<T>
impl<'a, T> IntoIterator for &'a ArraySequence<T>
sourceimpl<'a, T> IntoIterator for &'a mut ArraySequence<T>
impl<'a, T> IntoIterator for &'a mut ArraySequence<T>
sourceimpl<T: PartialEq> PartialEq<ArraySequence<T>> for ArraySequence<T>
impl<T: PartialEq> PartialEq<ArraySequence<T>> for ArraySequence<T>
sourcefn eq(&self, other: &ArraySequence<T>) -> bool
fn eq(&self, other: &ArraySequence<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ArraySequence<T>) -> bool
fn ne(&self, other: &ArraySequence<T>) -> bool
This method tests for !=
.
impl<T> StructuralPartialEq for ArraySequence<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ArraySequence<T> where
T: RefUnwindSafe,
impl<T> Send for ArraySequence<T> where
T: Send,
impl<T> Sync for ArraySequence<T> where
T: Sync,
impl<T> Unpin for ArraySequence<T> where
T: Unpin,
impl<T> UnwindSafe for ArraySequence<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more