pub enum Obj {
Null,
Bool(bool),
Num(f64),
Name(Vec<u8>),
Str(Vec<u8>),
Arr(Vec<Obj>),
Dict(Vec<(Vec<u8>, Obj)>),
Stream {
dict: Vec<(Vec<u8>, Obj)>,
data: Vec<u8>,
},
Ref(Ref),
}Expand description
A parsed PDF object. Dict keeps file order: dictionary keys repeat
legally and /Index-style array payloads rely on position, not sorting.
Variants§
Null
null
Bool(bool)
true / false
Num(f64)
A number. Integers and reals share one node; Obj::as_i64
refuses non-integral values.
Name(Vec<u8>)
A /Name without the leading slash, #xx escapes decoded.
Str(Vec<u8>)
A decoded string (literal or hex; escapes resolved).
Arr(Vec<Obj>)
[ … ]
Dict(Vec<(Vec<u8>, Obj)>)
<< … >>; keys are decoded names.
Stream
A dictionary followed by stream data. data is the raw stream
content (filters NOT applied).
Ref(Ref)
N G R
Implementations§
Trait Implementations§
impl StructuralPartialEq for Obj
Auto Trait Implementations§
impl Freeze for Obj
impl RefUnwindSafe for Obj
impl Send for Obj
impl Sync for Obj
impl Unpin for Obj
impl UnsafeUnpin for Obj
impl UnwindSafe for Obj
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