[][src]Enum allsorts::binary::read::ReadArrayCow

pub enum ReadArrayCow<'a, T> where
    T: ReadUnchecked<'a>, 
{ Owned(Vec<T::HostType>), Borrowed(ReadArray<'a, T>), }

Variants

Owned(Vec<T::HostType>)
Borrowed(ReadArray<'a, T>)

Methods

impl<'a, T: ReadUnchecked<'a>> ReadArrayCow<'a, T>[src]

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

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

pub fn read_item(&self, index: usize) -> Result<T::HostType, ParseError> where
    T::HostType: Copy
[src]

pub fn get_item(&self, index: usize) -> <T as ReadUnchecked<'a>>::HostType where
    T: ReadUnchecked<'a>,
    <T as ReadUnchecked<'a>>::HostType: Copy
[src]

Important traits for ReadArrayCowIter<'a, 'b, T>
pub fn iter<'b>(&'b self) -> ReadArrayCowIter<'a, 'b, T>[src]

Trait Implementations

impl<'a, T: ReadUnchecked<'a>> CheckIndex for ReadArrayCow<'a, T>[src]

impl<'a, '_, T> WriteBinary<&'_ ReadArrayCow<'a, T>> for ReadArrayCow<'a, T> where
    T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>,
    T::HostType: Copy
[src]

type Output = ()

The type of the value returned by write.

impl<'a, 'b, T: ReadUnchecked<'a>> IntoIterator for &'b ReadArrayCow<'a, T> where
    T::HostType: Copy
[src]

type Item = T::HostType

The type of the elements being iterated over.

type IntoIter = ReadArrayCowIter<'a, 'b, T>

Which kind of iterator are we turning this into?

impl<'a, T: Clone> Clone for ReadArrayCow<'a, T> where
    T: ReadUnchecked<'a>,
    T::HostType: Clone
[src]

impl<'a, T> Debug for ReadArrayCow<'a, T> where
    T: ReadUnchecked<'a>,
    <T as ReadUnchecked<'a>>::HostType: Copy + Debug
[src]

Auto Trait Implementations

impl<'a, T> Send for ReadArrayCow<'a, T> where
    T: ReadBinary<'a>,
    <T as ReadUnchecked<'a>>::HostType: Send

impl<'a, T> Sync for ReadArrayCow<'a, T> where
    T: ReadBinary<'a>,
    <T as ReadUnchecked<'a>>::HostType: Sync

impl<'a, T> Unpin for ReadArrayCow<'a, T> where
    T: ReadBinary<'a>,
    <T as ReadUnchecked<'a>>::HostType: Unpin

impl<'a, T> UnwindSafe for ReadArrayCow<'a, T> where
    T: ReadBinary<'a>,
    <T as ReadUnchecked<'a>>::HostType: UnwindSafe

impl<'a, T> RefUnwindSafe for ReadArrayCow<'a, T> where
    T: ReadBinary<'a>,
    <T as ReadUnchecked<'a>>::HostType: RefUnwindSafe

Blanket Implementations

impl<T, HostType> WriteBinaryDep<HostType> for T where
    T: WriteBinary<HostType>, 
[src]

type Args = ()

The type of the arguments supplied to write_dep.

type Output = <T as WriteBinary<HostType>>::Output

The type of the value returned by write_dep.

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

impl<T> From<T> for 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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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