[][src]Enum unstructured::Document

pub enum Document {
    Bool(bool),
    U8(u8),
    U16(u16),
    U32(u32),
    U64(u64),
    I8(i8),
    I16(i16),
    I32(i32),
    I64(i64),
    F32(f32),
    F64(f64),
    Char(char),
    String(String),
    Unit,
    Option(Option<Box<Document>>),
    Newtype(Box<Document>),
    Seq(Vec<Document>),
    Map(BTreeMap<Document, Document>),
    Bytes(Vec<u8>),
}

Variants

Bool(bool)U8(u8)U16(u16)U32(u32)U64(u64)I8(i8)I16(i16)I32(i32)I64(i64)F32(f32)F64(f64)Char(char)String(String)UnitOption(Option<Box<Document>>)Newtype(Box<Document>)Seq(Vec<Document>)Map(BTreeMap<Document, Document>)Bytes(Vec<u8>)

Methods

impl Document[src]

pub fn is_i8(&self) -> bool[src]

pub fn as_i8(&self) -> Option<i8>[src]

pub fn take_i8(&mut self) -> Option<i8>[src]

pub fn is_i16(&self) -> bool[src]

pub fn as_i16(&self) -> Option<i16>[src]

pub fn take_i16(&mut self) -> Option<i16>[src]

pub fn is_i32(&self) -> bool[src]

pub fn as_i32(&self) -> Option<i32>[src]

pub fn take_i32(&mut self) -> Option<i32>[src]

pub fn is_i64(&self) -> bool[src]

pub fn as_i64(&self) -> Option<i64>[src]

pub fn take_i64(&mut self) -> Option<i64>[src]

pub fn is_u8(&self) -> bool[src]

pub fn as_u8(&self) -> Option<u8>[src]

pub fn take_u8(&mut self) -> Option<u8>[src]

pub fn is_u16(&self) -> bool[src]

pub fn as_u16(&self) -> Option<u16>[src]

pub fn take_u16(&mut self) -> Option<u16>[src]

pub fn is_u32(&self) -> bool[src]

pub fn as_u32(&self) -> Option<u32>[src]

pub fn take_u32(&mut self) -> Option<u32>[src]

pub fn is_u64(&self) -> bool[src]

pub fn as_u64(&self) -> Option<u64>[src]

pub fn take_u64(&mut self) -> Option<u64>[src]

pub fn is_f32(&self) -> bool[src]

pub fn as_f32(&self) -> Option<f32>[src]

pub fn take_f32(&mut self) -> Option<f32>[src]

pub fn is_f64(&self) -> bool[src]

pub fn as_f64(&self) -> Option<f64>[src]

pub fn take_f64(&mut self) -> Option<f64>[src]

pub fn is_bool(&self) -> bool[src]

pub fn as_bool(&self) -> Option<bool>[src]

pub fn take_bool(&mut self) -> Option<bool>[src]

pub fn is_char(&self) -> bool[src]

pub fn as_char(&self) -> Option<char>[src]

pub fn take_char(&mut self) -> Option<char>[src]

pub fn is_string(&self) -> bool[src]

pub fn as_string(&self) -> Option<String>[src]

pub fn take_string(&mut self) -> Option<String>[src]

pub fn is_map(&self) -> bool[src]

pub fn as_map(&self) -> Option<BTreeMap<Document, Document>>[src]

pub fn take_map(&mut self) -> Option<BTreeMap<Document, Document>>[src]

pub fn is_option(&self) -> bool[src]

pub fn as_option(&self) -> Option<Option<Box<Document>>>[src]

pub fn take_option(&mut self) -> Option<Option<Box<Document>>>[src]

pub fn is_bytes(&self) -> bool[src]

pub fn as_bytes(&self) -> Option<Vec<u8>>[src]

pub fn take_bytes(&mut self) -> Option<Vec<u8>>[src]

pub fn is_seq(&self) -> bool[src]

pub fn as_seq(&self) -> Option<Vec<Document>>[src]

pub fn take_seq(&mut self) -> Option<Vec<Document>>[src]

pub fn is_newtype(&self) -> bool[src]

pub fn as_newtype(&self) -> Option<Box<Document>>[src]

pub fn take_newtype(&mut self) -> Option<Box<Document>>[src]

pub fn replace(&mut self, new_val: Document) -> Self[src]

pub fn pointer<'a>(&'a self, pointer: &str) -> Option<&'a Document>[src]

pub fn pointer_mut<'a>(&'a mut self, pointer: &str) -> Option<&'a mut Document>[src]

pub fn is_unit(&self) -> bool[src]

pub fn is_number(&self) -> bool[src]

pub fn is_signed(&self) -> bool[src]

pub fn is_unsigned(&self) -> bool[src]

pub fn is_float(&self) -> bool[src]

pub fn try_into<'de, T: Deserialize<'de>>(self) -> Result<T, DeserializerError>[src]

pub fn new<T: Serialize>(value: T) -> Result<Self, SerializerError>[src]

Trait Implementations

impl From<i8> for Document[src]

impl From<i16> for Document[src]

impl From<i32> for Document[src]

impl From<i64> for Document[src]

impl From<u8> for Document[src]

impl From<u16> for Document[src]

impl From<u32> for Document[src]

impl From<u64> for Document[src]

impl From<f32> for Document[src]

impl From<f64> for Document[src]

impl From<bool> for Document[src]

impl From<char> for Document[src]

impl From<String> for Document[src]

impl<'_> From<&'_ str> for Document[src]

impl From<Vec<u8>> for Document[src]

impl From<Vec<Document>> for Document[src]

impl From<BTreeMap<Document, Document>> for Document[src]

impl Eq for Document[src]

impl Clone for Document[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<Document> for Document[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl PartialOrd<Document> for Document[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Document[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Default for Document[src]

impl Hash for Document[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<I> Index<I> for Document where
    I: Index, 
[src]

type Output = Document

The returned type after indexing.

impl<I> IndexMut<I> for Document where
    I: Index, 
[src]

impl Debug for Document[src]

impl Display for Document[src]

impl Serialize for Document[src]

impl<'de> IntoDeserializer<'de, DeserializerError> for Document[src]

type Deserializer = Document

The type of the deserializer being converted into.

impl<'de> Deserializer<'de> for Document[src]

type Error = DeserializerError

The error type that can be returned if some error occurs during deserialization. Read more

fn deserialize_i128<V>(
    self,
    visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error> where
    V: Visitor<'de>, 
[src]

Hint that the Deserialize type is expecting an i128 value. Read more

fn deserialize_u128<V>(
    self,
    visitor: V
) -> Result<<V as Visitor<'de>>::Value, Self::Error> where
    V: Visitor<'de>, 
[src]

Hint that the Deserialize type is expecting an u128 value. Read more

fn is_human_readable(&self) -> bool[src]

Determine whether Deserialize implementations should expect to deserialize their human-readable form. Read more

impl<'de> Deserialize<'de> for Document[src]

Auto Trait Implementations

impl Send for Document

impl Sync for Document

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]