[][src]Struct avocado::dsl::doc::Document

pub struct Document<T>(_);

A top-level DSL document consisting of multiple path => sub-operation specifiers and respecting the order of insertion during iteration.

Methods

impl<T> Document<T>
[src]

Creates an empty document.

Creates an empty document with the specified capacity.

Returns the current capacity of the document.

Returns the number of entries (key-value pairs) in the document.

Returns true if and only if the document contains no entries.

Reserves additional capacity for the document.

Inserts a key and a value into the document. If the key already exists, returns the previous value associated with it.

Returns true if and only if the document contains the specified key.

Returns a reference to the subquery associated with the key.

Returns a mutable reference to the subquery associated with the key.

Removes the subquery associated with the key and returns it.

Removes all key-value pairs, leaving the document in an empty state.

Trait Implementations

impl<T: PartialOrd> PartialOrd<Document<T>> for Document<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

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

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

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

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

impl<T> Default for Document<T>
[src]

Returns the "default value" for a type. Read more

impl<T: Ord> Ord for Document<T>
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<T: PartialEq> PartialEq<Document<T>> for Document<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Filter::from(FilterDoc) yields a Filter::Doc(...).

Performs the conversion.

impl<T: Clone> Clone for Document<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> IntoIterator for Document<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a, T> IntoIterator for &'a Document<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a, T> IntoIterator for &'a mut Document<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<T, K, V> Extend<(K, V)> for Document<T> where
    K: Into<Cow<'static, str>>,
    V: Into<T>, 
[src]

Extends a collection with the contents of an iterator. Read more

impl<T: Eq> Eq for Document<T>
[src]

impl<T: Debug> Debug for Document<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Hash> Hash for Document<T>
[src]

Feeds this value into the given [Hasher]. Read more

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

impl<T, K, V> FromIterator<(K, V)> for Document<T> where
    K: Into<Cow<'static, str>>,
    V: Into<T>, 
[src]

Creates a value from an iterator. Read more

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

Deserialize this value from the given Serde deserializer. Read more

impl<T> Serialize for Document<T> where
    T: Serialize
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl<T> Send for Document<T> where
    T: Send

impl<T> Sync for Document<T> where
    T: Sync

Blanket Implementations

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

Performs the conversion.

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

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

impl<I> IntoIterator for I where
    I: Iterator
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

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

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

Compare self to key and return true if they are equal.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

impl<T> Same for T

Should always be Self