#[non_exhaustive]pub enum CosObject {
Null,
Boolean(bool),
Integer(i64),
Real(f64),
Name(PdfName),
String(PdfString),
Array(Vec<CosObject>),
Dictionary(Dictionary),
Stream(StreamObject),
Reference(ObjectKey),
}Expand description
PDF COS object.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Null
Null object.
Boolean(bool)
Boolean object.
Integer(i64)
Integer number.
Real(f64)
Real number, stored as finite f64.
Name(PdfName)
Name object.
String(PdfString)
String object.
Array(Vec<CosObject>)
Array object.
Dictionary(Dictionary)
Dictionary object.
Stream(StreamObject)
Stream object.
Reference(ObjectKey)
Indirect reference.
Implementations§
Source§impl CosObject
impl CosObject
Sourcepub fn as_dictionary(&self) -> Option<&Dictionary>
pub fn as_dictionary(&self) -> Option<&Dictionary>
Returns this object as a dictionary when it has that shape.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CosObject
impl<'de> Deserialize<'de> for CosObject
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CosObject> for ModelValue
impl From<CosObject> for ModelValue
impl StructuralPartialEq for CosObject
Auto Trait Implementations§
impl Freeze for CosObject
impl RefUnwindSafe for CosObject
impl Send for CosObject
impl Sync for CosObject
impl Unpin for CosObject
impl UnsafeUnpin for CosObject
impl UnwindSafe for CosObject
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