pub enum Object<'a> {
Null(Null),
Boolean(bool),
Number(Number),
String(String<'a>),
Name(Name<'a>),
Dict(Dict<'a>),
Array(Array<'a>),
Stream(Stream<'a>),
}Expand description
A primitive PDF object.
Variants§
Null(Null)
A null object.
Boolean(bool)
A boolean object.
Number(Number)
A number object.
String(String<'a>)
A string object.
Name(Name<'a>)
A name object.
Dict(Dict<'a>)
A dict object.
Array(Array<'a>)
An array object.
Stream(Stream<'a>)
A stream object.
Implementations§
Source§impl<'a> Object<'a>
impl<'a> Object<'a>
Sourcepub fn into_string(self) -> Option<String<'a>>
pub fn into_string(self) -> Option<String<'a>>
Try casting the object to a string.
Sourcepub fn into_stream(self) -> Option<Stream<'a>>
pub fn into_stream(self) -> Option<Stream<'a>>
Try casting the object to a stream.
Sourcepub fn into_array(self) -> Option<Array<'a>>
pub fn into_array(self) -> Option<Array<'a>>
Try casting the object to an array.
Sourcepub fn into_number(self) -> Option<Number>
pub fn into_number(self) -> Option<Number>
Try casting the object to a number.
Trait Implementations§
Source§impl<'a, T, U, V> TryFrom<Object<'a>> for (T, U, V)where
T: ObjectLike<'a>,
U: ObjectLike<'a>,
V: ObjectLike<'a>,
impl<'a, T, U, V> TryFrom<Object<'a>> for (T, U, V)where
T: ObjectLike<'a>,
U: ObjectLike<'a>,
V: ObjectLike<'a>,
Source§impl<'a, T, U, V, W> TryFrom<Object<'a>> for (T, U, V, W)where
T: ObjectLike<'a>,
U: ObjectLike<'a>,
V: ObjectLike<'a>,
W: ObjectLike<'a>,
impl<'a, T, U, V, W> TryFrom<Object<'a>> for (T, U, V, W)where
T: ObjectLike<'a>,
U: ObjectLike<'a>,
V: ObjectLike<'a>,
W: ObjectLike<'a>,
Source§impl<'a, T, U, V, W, X> TryFrom<Object<'a>> for (T, U, V, W, X)where
T: ObjectLike<'a>,
U: ObjectLike<'a>,
V: ObjectLike<'a>,
W: ObjectLike<'a>,
X: ObjectLike<'a>,
impl<'a, T, U, V, W, X> TryFrom<Object<'a>> for (T, U, V, W, X)where
T: ObjectLike<'a>,
U: ObjectLike<'a>,
V: ObjectLike<'a>,
W: ObjectLike<'a>,
X: ObjectLike<'a>,
Source§impl<'a> TryFrom<Object<'a>> for LiteralString<'a>
impl<'a> TryFrom<Object<'a>> for LiteralString<'a>
Source§impl<'a, U: ObjectLike<'a>, T: ObjectLike<'a> + Array<Item = U>> TryFrom<Object<'a>> for SmallVec<T>
impl<'a, U: ObjectLike<'a>, T: ObjectLike<'a> + Array<Item = U>> TryFrom<Object<'a>> for SmallVec<T>
impl<'a> StructuralPartialEq for Object<'a>
Auto Trait Implementations§
impl<'a> Freeze for Object<'a>
impl<'a> !RefUnwindSafe for Object<'a>
impl<'a> Send for Object<'a>
impl<'a> Sync for Object<'a>
impl<'a> Unpin for Object<'a>
impl<'a> !UnwindSafe for Object<'a>
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