pub enum COSObject {
Null,
Boolean(bool),
Integer(i64),
Real(f64),
String(COSString),
Name(COSName),
Array(COSArray),
Dictionary(COSDictionary),
Stream(COSStream),
Reference(ObjectId),
}Expand description
The fundamental COS Object enum in PDF.
Variants§
Null
Boolean(bool)
Integer(i64)
Real(f64)
String(COSString)
Name(COSName)
Array(COSArray)
Dictionary(COSDictionary)
Stream(COSStream)
Reference(ObjectId)
Implementations§
Source§impl COSObject
impl COSObject
pub const fn null() -> Self
pub fn type_name(&self) -> &'static str
pub fn as_integer(&self) -> Option<i64>
pub fn as_float(&self) -> Option<f64>
pub fn as_bool(&self) -> Option<bool>
pub fn as_name(&self) -> Option<&str>
pub fn as_string(&self) -> Option<&COSString>
pub fn as_dict(&self) -> Option<&COSDictionary>
pub fn as_dict_mut(&mut self) -> Option<&mut COSDictionary>
pub fn as_array(&self) -> Option<&COSArray>
pub fn as_stream(&self) -> Option<&COSStream>
pub fn as_reference(&self) -> Option<ObjectId>
Trait Implementations§
Source§impl From<COSDictionary> for COSObject
impl From<COSDictionary> for COSObject
Source§fn from(d: COSDictionary) -> Self
fn from(d: COSDictionary) -> Self
Converts to this type from the input type.
Source§impl From<PDRectangle> for COSObject
impl From<PDRectangle> for COSObject
Source§fn from(rect: PDRectangle) -> Self
fn from(rect: PDRectangle) -> Self
Converts to this type from the input type.
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