pub struct Index<'a> {
pub count: usize,
/* private fields */
}
Expand description
A CFF INDEX described in Section 5 of Technical Note #5176
Fields
count: usize
Implementations
sourceimpl<'a> Index<'a>
impl<'a> Index<'a>
pub fn read<T: ReadBinaryDep<'a, Args = ()>>(
&'a self,
index: usize
) -> Result<T::HostType, ParseError>
pub fn iter(&self) -> impl Iterator<Item = &[u8]>
sourcepub fn calculate_size<'b, T, HostType>(
objects: &'b [&HostType],
args: T::Args
) -> Result<usize, WriteError> where
T: WriteBinaryDep<&'b HostType>,
T::Args: Clone,
pub fn calculate_size<'b, T, HostType>(
objects: &'b [&HostType],
args: T::Args
) -> Result<usize, WriteError> where
T: WriteBinaryDep<&'b HostType>,
T::Args: Clone,
Returns the length required to write objects
.
Trait Implementations
sourceimpl<'a> ReadBinary<'a> for Index<'a>
impl<'a> ReadBinary<'a> for Index<'a>
sourceimpl<'a> WriteBinary<&'_ Index<'a>> for Index<'a>
impl<'a> WriteBinary<&'_ Index<'a>> for Index<'a>
sourcefn write<C: WriteContext>(
ctxt: &mut C,
index: &Index<'a>
) -> Result<(), WriteError>
fn write<C: WriteContext>(
ctxt: &mut C,
index: &Index<'a>
) -> Result<(), WriteError>
Write the binary representation of Self to ctxt
.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Index<'a>
impl<'a> Send for Index<'a>
impl<'a> Sync for Index<'a>
impl<'a> Unpin for Index<'a>
impl<'a> UnwindSafe for Index<'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<'a, T> ReadBinaryDep<'a> for T where
T: ReadBinary<'a>,
impl<'a, T> ReadBinaryDep<'a> for T where
T: ReadBinary<'a>,
type Args = ()
type HostType = <T as ReadBinary<'a>>::HostType
fn read_dep(
ctxt: &mut ReadCtxt<'a>,
<T as ReadBinaryDep<'a>>::Args
) -> Result<<T as ReadBinaryDep<'a>>::HostType, ParseError>
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
.