pub struct Dict<T> where
T: DictDefault, { /* private fields */ }
Expand description
A CFF DICT described in Section 4 of Technical Note #5176
Implementations
sourceimpl<'a, T> Dict<T> where
T: DictDefault,
impl<'a, T> Dict<T> where
T: DictDefault,
pub fn new() -> Self
pub fn get_with_default(&self, key: Operator) -> Option<&[Operand]>
pub fn get(&self, key: Operator) -> Option<&[Operand]>
sourcepub fn get_i32(&self, key: Operator) -> Option<Result<i32, ParseError>>
pub fn get_i32(&self, key: Operator) -> Option<Result<i32, ParseError>>
Returns the i32 value of this operator if the operands hold a single Integer.
pub fn iter(&self) -> impl Iterator<Item = &(Operator, Vec<Operand>)>
sourcepub fn first_operator(&self) -> Option<Operator>
pub fn first_operator(&self) -> Option<Operator>
Returns the first operator of this DICT or None
if the DICT is empty.
sourcepub fn read_private_dict(
&self,
scope: &ReadScope<'a>
) -> Result<(PrivateDict, usize), ParseError>
pub fn read_private_dict(
&self,
scope: &ReadScope<'a>
) -> Result<(PrivateDict, usize), ParseError>
Read a PrivateDict from this Dict returning it and its offset within scope
on success.
A Private DICT is required, but may be specified as having a length of 0 if there are no non-default values to be stored.
pub fn len(&self) -> usize
Trait Implementations
sourceimpl<T: Clone> Clone for Dict<T> where
T: DictDefault,
impl<T: Clone> Clone for Dict<T> where
T: DictDefault,
sourceimpl<T: Debug> Debug for Dict<T> where
T: DictDefault,
impl<T: Debug> Debug for Dict<T> where
T: DictDefault,
sourceimpl<'a, T> ReadBinary<'a> for Dict<T> where
T: DictDefault,
impl<'a, T> ReadBinary<'a> for Dict<T> where
T: DictDefault,
sourceimpl<T> WriteBinaryDep<&Dict<T>> for Dict<T> where
T: DictDefault,
impl<T> WriteBinaryDep<&Dict<T>> for Dict<T> where
T: DictDefault,
sourcefn write_dep<C: WriteContext>(
ctxt: &mut C,
dict: &Dict<T>,
delta: DictDelta
) -> Result<Self::Output, WriteError>
fn write_dep<C: WriteContext>(
ctxt: &mut C,
dict: &Dict<T>,
delta: DictDelta
) -> Result<Self::Output, WriteError>
Write the binary representation of Self to ctxt
.
impl<T> StructuralPartialEq for Dict<T> where
T: DictDefault,
Auto Trait Implementations
impl<T> RefUnwindSafe for Dict<T> where
T: RefUnwindSafe,
impl<T> Send for Dict<T> where
T: Send,
impl<T> Sync for Dict<T> where
T: Sync,
impl<T> Unpin for Dict<T> where
T: Unpin,
impl<T> UnwindSafe for Dict<T> where
T: 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