pub enum Object {
Null,
Boolean(bool),
Integer(i64),
Real(f64),
String(String),
Name(String),
Array(Vec<Object>),
Dictionary(Dictionary),
Stream(Dictionary, Vec<u8>),
Reference(ObjectId),
}Variants§
Null
Boolean(bool)
Integer(i64)
Real(f64)
String(String)
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_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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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