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>)
Implementations
sourceimpl<'a, T: ReadUnchecked<'a>> ReadArrayCow<'a, T>
impl<'a, T: ReadUnchecked<'a>> ReadArrayCow<'a, T>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn read_item(&self, index: usize) -> Result<T::HostType, ParseError> where
T::HostType: Copy,
pub fn get_item(&self, index: usize) -> <T as ReadUnchecked<'a>>::HostType where
T: ReadUnchecked<'a>,
<T as ReadUnchecked<'a>>::HostType: Copy,
pub fn iter<'b>(&'b self) -> ReadArrayCowIter<'a, 'b, T>ⓘNotable traits for ReadArrayCowIter<'a, 'b, T>impl<'a, 'b, T: ReadUnchecked<'a>> Iterator for ReadArrayCowIter<'a, 'b, T> where
T::HostType: Copy, type Item = T::HostType;
T::HostType: Copy, type Item = T::HostType;
Trait Implementations
sourceimpl<'a, T: ReadUnchecked<'a>> CheckIndex for ReadArrayCow<'a, T>
impl<'a, T: ReadUnchecked<'a>> CheckIndex for ReadArrayCow<'a, T>
fn check_index(&self, index: usize) -> Result<(), ParseError>
sourceimpl<'a, T: Clone> Clone for ReadArrayCow<'a, T> where
T: ReadUnchecked<'a>,
T::HostType: Clone,
impl<'a, T: Clone> Clone for ReadArrayCow<'a, T> where
T: ReadUnchecked<'a>,
T::HostType: Clone,
sourcefn clone(&self) -> ReadArrayCow<'a, T>
fn clone(&self) -> ReadArrayCow<'a, 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<'a, T> Debug for ReadArrayCow<'a, T> where
T: ReadUnchecked<'a>,
<T as ReadUnchecked<'a>>::HostType: Copy + Debug,
impl<'a, T> Debug for ReadArrayCow<'a, T> where
T: ReadUnchecked<'a>,
<T as ReadUnchecked<'a>>::HostType: Copy + Debug,
sourceimpl<'a, 'b, T: ReadUnchecked<'a>> IntoIterator for &'b ReadArrayCow<'a, T> where
T::HostType: Copy,
impl<'a, 'b, T: ReadUnchecked<'a>> IntoIterator for &'b ReadArrayCow<'a, T> where
T::HostType: Copy,
type Item = <T as ReadUnchecked<'a>>::HostType
type Item = <T as ReadUnchecked<'a>>::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?
sourcefn into_iter(self) -> ReadArrayCowIter<'a, 'b, T>ⓘNotable traits for ReadArrayCowIter<'a, 'b, T>impl<'a, 'b, T: ReadUnchecked<'a>> Iterator for ReadArrayCowIter<'a, 'b, T> where
T::HostType: Copy, type Item = T::HostType;
fn into_iter(self) -> ReadArrayCowIter<'a, 'b, T>ⓘNotable traits for ReadArrayCowIter<'a, 'b, T>impl<'a, 'b, T: ReadUnchecked<'a>> Iterator for ReadArrayCowIter<'a, 'b, T> where
T::HostType: Copy, type Item = T::HostType;
T::HostType: Copy, type Item = T::HostType;
Creates an iterator from a value. Read more
sourceimpl<'a, T> WriteBinary<&'_ ReadArrayCow<'a, T>> for ReadArrayCow<'a, T> where
T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>,
T::HostType: Copy,
impl<'a, T> WriteBinary<&'_ ReadArrayCow<'a, T>> for ReadArrayCow<'a, T> where
T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>,
T::HostType: Copy,
sourcefn write<C: WriteContext>(ctxt: &mut C, array: &Self) -> Result<(), WriteError>
fn write<C: WriteContext>(ctxt: &mut C, array: &Self) -> Result<(), WriteError>
Write the binary representation of Self to ctxt
.
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for ReadArrayCow<'a, T> where
<T as ReadUnchecked<'a>>::HostType: RefUnwindSafe,
impl<'a, T> Send for ReadArrayCow<'a, T> where
<T as ReadUnchecked<'a>>::HostType: Send,
impl<'a, T> Sync for ReadArrayCow<'a, T> where
<T as ReadUnchecked<'a>>::HostType: Sync,
impl<'a, T> Unpin for ReadArrayCow<'a, T> where
<T as ReadUnchecked<'a>>::HostType: Unpin,
impl<'a, T> UnwindSafe for ReadArrayCow<'a, T> where
<T as ReadUnchecked<'a>>::HostType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, HostType> WriteBinaryDep<HostType> for T where
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for T where
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
.
sourcefn 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
.