pub enum Object {
Null,
Boolean(bool),
Integer(i64),
Real(f64),
String(String),
ByteString(Vec<u8>),
Name(String),
Array(Vec<Object>),
Dictionary(Dictionary),
Stream(Dictionary, Vec<u8>),
Reference(ObjectId),
}Variants§
Null
Boolean(bool)
Integer(i64)
Real(f64)
String(String)
ByteString(Vec<u8>)
Binary string — arbitrary bytes written as PDF hex string <AABB...>
Used for encryption hashes (/U, /O, /UE, /OE) and file IDs where
byte-perfect fidelity is required (ISO 32000-1 §7.3.4.3).
Name(String)
Array(Vec<Object>)
Dictionary(Dictionary)
Stream(Dictionary, Vec<u8>)
Reference(ObjectId)
Implementations§
Source§impl Object
impl Object
pub fn is_null(&self) -> bool
pub fn as_bool(&self) -> Option<bool>
pub fn as_integer(&self) -> Option<i64>
pub fn as_real(&self) -> Option<f64>
pub fn as_string(&self) -> Option<&str>
pub fn as_byte_string(&self) -> Option<&[u8]>
pub fn as_name(&self) -> Option<&str>
pub fn as_array(&self) -> Option<&Vec<Object>>
pub fn as_dict(&self) -> Option<&Dictionary>
Trait Implementations§
Source§impl From<Dictionary> for Object
impl From<Dictionary> for Object
Source§fn from(d: Dictionary) -> Self
fn from(d: Dictionary) -> Self
Converts to this type from the input type.
Source§impl FromIterator<Object> for Array
impl FromIterator<Object> for Array
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Object
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