pub enum PdfObject {
Null,
Bool(bool),
Integer(i64),
Real(f64),
Name(Vec<u8>),
String(Vec<u8>),
Array(Vec<PdfObject>),
Dict(PdfDict),
Stream {
dict: PdfDict,
data: Vec<u8>,
},
Reference(IndirectRef),
}Expand description
A PDF object value.
Variants§
Null
Bool(bool)
Integer(i64)
Real(f64)
Name(Vec<u8>)
Name object (without leading /). Stored as raw bytes.
String(Vec<u8>)
String object (literal or hex). Stored as raw bytes.
Array(Vec<PdfObject>)
Array of PDF objects.
Dict(PdfDict)
Dictionary of PDF objects.
Stream
Stream: a dictionary plus raw (still-encoded) data.
Reference(IndirectRef)
Indirect reference: N M R.
Implementations§
Source§impl PdfObject
impl PdfObject
pub fn is_null(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn is_real(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_name(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_array(&self) -> bool
pub fn is_dict(&self) -> bool
pub fn is_stream(&self) -> bool
pub fn is_reference(&self) -> bool
pub fn as_bool(&self) -> Option<bool>
pub fn as_i64(&self) -> Option<i64>
pub fn as_f64(&self) -> Option<f64>
pub fn as_name(&self) -> Option<&[u8]>
pub fn as_str(&self) -> Option<&[u8]>
pub fn as_array(&self) -> Option<&[PdfObject]>
pub fn as_dict(&self) -> Option<&PdfDict>
pub fn as_reference(&self) -> Option<&IndirectRef>
pub fn as_stream(&self) -> Option<(&PdfDict, &[u8])>
Trait Implementations§
impl StructuralPartialEq for PdfObject
Auto Trait Implementations§
impl Freeze for PdfObject
impl RefUnwindSafe for PdfObject
impl Send for PdfObject
impl Sync for PdfObject
impl Unpin for PdfObject
impl UnsafeUnpin for PdfObject
impl UnwindSafe for PdfObject
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more