[][src]Struct trk_io::ArraySequence

pub struct ArraySequence<T> {
    pub offsets: Vec<usize>,
    pub data: Vec<T>,
}

Fields

offsets: Vec<usize>data: Vec<T>

Methods

impl<T> ArraySequence<T>[src]

pub fn empty() -> ArraySequence<T>[src]

pub fn with_capacity(n: usize) -> ArraySequence<T>[src]

pub fn new(lengths: Vec<usize>, data: Vec<T>) -> ArraySequence<T>[src]

pub fn push(&mut self, val: T)[src]

pub fn nb_push_done(&self) -> usize[src]

pub fn end_push(&mut self)[src]

pub fn is_empty(&self) -> bool[src]

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[src]

pub fn length_of_array(&self, i: usize) -> usize[src]

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
[src]

pub fn iter(&self) -> ArraySequenceIterator<T>[src]

pub fn iter_mut(&mut self) -> ArraySequenceIteratorMut<T>[src]

impl<T: Clone> ArraySequence<T>[src]

pub fn extend_from_slice(&mut self, other: &[T])[src]

Trait Implementations

impl<'a, T> IntoIterator for &'a ArraySequence<T>[src]

type Item = &'a [T]

The type of the elements being iterated over.

type IntoIter = ArraySequenceIterator<'a, T>

Which kind of iterator are we turning this into?

impl<'a, T> IntoIterator for &'a mut ArraySequence<T>[src]

type Item = &'a mut [T]

The type of the elements being iterated over.

type IntoIter = ArraySequenceIteratorMut<'a, T>

Which kind of iterator are we turning this into?

impl<T: Clone> Clone for ArraySequence<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> Extend<T> for ArraySequence<T>[src]

impl<T: PartialEq> PartialEq<ArraySequence<T>> for ArraySequence<T>[src]

impl<T> Default for ArraySequence<T>[src]

impl<T> Index<usize> for ArraySequence<T>[src]

type Output = [T]

The returned type after indexing.

Auto Trait Implementations

impl<T> Send for ArraySequence<T> where
    T: Send

impl<T> Sync for ArraySequence<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>,