pub enum Object {
Null,
Bool(bool),
Int(i64),
Real(f64),
String(Vec<u8>),
Name(Name),
Array(Vec<Object>),
Dict(Dict),
Stream(Box<Stream>),
Ref(Ref),
}Expand description
one object of a PDF file
Variants§
Null
Bool(bool)
Int(i64)
Real(f64)
String(Vec<u8>)
a string’s bytes (decrypted); text strings decode with text_string
Name(Name)
Array(Vec<Object>)
Dict(Dict)
Stream(Box<Stream>)
boxed: keeps every object at 32 bytes
Ref(Ref)
Implementations§
Source§impl Object
impl Object
pub fn name(s: &str) -> Object
pub fn is_null(&self) -> bool
pub fn as_bool(&self) -> Option<bool>
Sourcepub fn as_int(&self) -> Option<i64>
pub fn as_int(&self) -> Option<i64>
an integer, or a real that is one (some writers put 1.0 where an integer belongs)
pub fn as_name(&self) -> Option<&[u8]>
pub fn as_array(&self) -> Option<&[Object]>
pub fn as_stream(&self) -> Option<&Stream>
pub fn as_ref(&self) -> Option<Ref>
Trait Implementations§
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Forget for Object
impl Freeze for Object
impl Move for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Objectwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Object>: UnsafeUnpin,
*const ArcInner<BTreeMap<Name, Object>> is !null: UnsafeUnpin,
PhantomData<ArcInner<BTreeMap<Name, Object>>>: UnsafeUnpin,
*const Stream is !null: UnsafeUnpin,
PhantomData<Stream>: UnsafeUnpin,
impl UnwindSafe for Object
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