Enum allsorts::binary::read::ReadArrayCow
source · pub enum ReadArrayCow<'a, T>where
T: ReadUnchecked,{
Owned(Vec<T::HostType>),
Borrowed(ReadArray<'a, T>),
}
Variants§
Implementations§
source§impl<'a, T: ReadUnchecked> ReadArrayCow<'a, T>
impl<'a, T: ReadUnchecked> ReadArrayCow<'a, T>
Trait Implementations§
source§impl<'a, T: ReadUnchecked> CheckIndex for ReadArrayCow<'a, T>
impl<'a, T: ReadUnchecked> CheckIndex for ReadArrayCow<'a, T>
fn check_index(&self, index: usize) -> Result<(), ParseError>
source§impl<'a, T> Clone for ReadArrayCow<'a, T>
impl<'a, T> Clone for ReadArrayCow<'a, T>
source§fn clone(&self) -> ReadArrayCow<'a, T>
fn clone(&self) -> ReadArrayCow<'a, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, T> Debug for ReadArrayCow<'a, T>
impl<'a, T> Debug for ReadArrayCow<'a, T>
source§impl<'a, 'b, T: ReadUnchecked> IntoIterator for &'b ReadArrayCow<'a, T>
impl<'a, 'b, T: ReadUnchecked> IntoIterator for &'b ReadArrayCow<'a, T>
§type Item = <T as ReadUnchecked>::HostType
type Item = <T as ReadUnchecked>::HostType
The type of the elements being iterated over.
§type IntoIter = ReadArrayCowIter<'a, 'b, T>
type IntoIter = ReadArrayCowIter<'a, 'b, T>
Which kind of iterator are we turning this into?
source§impl<'a, T> WriteBinary<&ReadArrayCow<'a, T>> for ReadArrayCow<'a, T>
impl<'a, T> WriteBinary<&ReadArrayCow<'a, T>> for ReadArrayCow<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for ReadArrayCow<'a, T>
impl<'a, T> RefUnwindSafe for ReadArrayCow<'a, T>
impl<'a, T> Send for ReadArrayCow<'a, T>
impl<'a, T> Sync for ReadArrayCow<'a, T>
impl<'a, T> Unpin for ReadArrayCow<'a, T>
impl<'a, T> UnwindSafe for ReadArrayCow<'a, T>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
§type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by
write_dep
.source§fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
Write the binary representation of Self to
ctxt
.