Struct tycho::partial::container::PartialContainer[][src]

pub struct PartialContainer<T: PartialContainerType> {
    pub pointer: PartialPointer,
    pub head: u64,
    pub param: T::ItemParam,
    // some fields omitted
}

Fields

pointer: PartialPointer

The container start pointer.

head: u64

The local container head pointer.

param: T::ItemParam

Parameters for the container.

Implementations

impl<T: PartialContainerType> PartialContainer<T>[src]

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

Returns if the local pointer head has reached the end of the container.

pub fn next<R: Read + Seek>(
    &mut self,
    reader: &mut PartialReader<R>
) -> TychoResult<Option<T::ItemType>>
[src]

Get the next item in the container

pub fn iter<'x, R: Read + Seek>(
    &'x mut self,
    reader: &'x mut PartialReader<R>
) -> PartialContainerIterator<'x, T, R>

Notable traits for PartialContainerIterator<'x, T, R>

impl<'x, T: PartialContainerType, R: Read + Seek> Iterator for PartialContainerIterator<'x, T, R> type Item = T::ItemType;
[src]

Get an iterator of the container.

pub fn collect<R: Read + Seek>(
    &mut self,
    reader: &mut PartialReader<R>
) -> TychoResult<Vec<T::ItemType>>
[src]

Collect all items within the container.

pub fn top(&mut self)[src]

Move the head to the top/start

impl<T: PartialContainerTypeAsync> PartialContainer<T>[src]

pub async fn next_async<R: AsyncRead + AsyncSeek + Unpin + Send>(
    &mut self,
    reader: &mut PartialReader<R>
) -> TychoResult<Option<T::ItemType>>
[src]

pub async fn collect_async<R: AsyncRead + AsyncSeek + Unpin + Send>(
    &mut self,
    reader: &mut PartialReader<R>
) -> TychoResult<Vec<T::ItemType>>
[src]

Trait Implementations

impl<T: Clone + PartialContainerType> Clone for PartialContainer<T> where
    T::ItemParam: Clone
[src]

impl<T: Debug + PartialContainerType> Debug for PartialContainer<T> where
    T::ItemParam: Debug
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PartialContainer<T> where
    T: RefUnwindSafe,
    <T as PartialContainerType>::ItemParam: RefUnwindSafe

impl<T> Send for PartialContainer<T> where
    T: Send,
    <T as PartialContainerType>::ItemParam: Send

impl<T> Sync for PartialContainer<T> where
    T: Sync,
    <T as PartialContainerType>::ItemParam: Sync

impl<T> Unpin for PartialContainer<T> where
    T: Unpin,
    <T as PartialContainerType>::ItemParam: Unpin

impl<T> UnwindSafe for PartialContainer<T> where
    T: UnwindSafe,
    <T as PartialContainerType>::ItemParam: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,