Enum allsorts::cff::MaybeOwnedIndex
source · [−]pub enum MaybeOwnedIndex<'a> {
Borrowed(Index<'a>),
Owned(Index),
}
Variants
Borrowed(Index<'a>)
Owned(Index)
Implementations
sourceimpl<'a> MaybeOwnedIndex<'a>
impl<'a> MaybeOwnedIndex<'a>
pub fn iter(&'a self) -> MaybeOwnedIndexIterator<'a>ⓘNotable traits for MaybeOwnedIndexIterator<'a>impl<'a> Iterator for MaybeOwnedIndexIterator<'a> type Item = &'a [u8];
pub fn read_object(&self, index: usize) -> Option<&[u8]>
Trait Implementations
sourceimpl<'a> Clone for MaybeOwnedIndex<'a>
impl<'a> Clone for MaybeOwnedIndex<'a>
sourcefn clone(&self) -> MaybeOwnedIndex<'a>
fn clone(&self) -> MaybeOwnedIndex<'a>
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> WriteBinary<&'_ MaybeOwnedIndex<'a>> for MaybeOwnedIndex<'a>
impl<'a> WriteBinary<&'_ MaybeOwnedIndex<'a>> for MaybeOwnedIndex<'a>
sourcefn write<C: WriteContext>(
ctxt: &mut C,
index: &MaybeOwnedIndex<'a>
) -> Result<(), WriteError>
fn write<C: WriteContext>(
ctxt: &mut C,
index: &MaybeOwnedIndex<'a>
) -> Result<(), WriteError>
Write the binary representation of Self to ctxt
.
Auto Trait Implementations
impl<'a> RefUnwindSafe for MaybeOwnedIndex<'a>
impl<'a> Send for MaybeOwnedIndex<'a>
impl<'a> Sync for MaybeOwnedIndex<'a>
impl<'a> Unpin for MaybeOwnedIndex<'a>
impl<'a> UnwindSafe for MaybeOwnedIndex<'a>
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
.