[][src]Struct zvariant::StructureBuilder

pub struct StructureBuilder<'a>(_);

Use this to efficiently build a Structure.

Implementations

impl<'a> StructureBuilder<'a>[src]

pub fn new() -> Self[src]

Create a new StructureBuilder.

Same as StructureBuilder::default().

pub fn add_field<T>(self, field: T) -> Self where
    T: Type + Into<Value<'a>>, 
[src]

Append field to self.

This method returns Self so that you can use the builder pattern to create a complex structure.

pub fn append_field<'e: 'a>(mut self: Self, field: Value<'e>) -> Self[src]

Append field to self.

Identical to add_field, except the field must be in the form of a Value.

pub fn build(self) -> Structure<'a>[src]

Build the Structure.

Trait Implementations

impl<'a> Clone for StructureBuilder<'a>[src]

impl<'a> Debug for StructureBuilder<'a>[src]

impl<'a> Default for StructureBuilder<'a>[src]

impl<'a> PartialEq<StructureBuilder<'a>> for StructureBuilder<'a>[src]

impl<'a> StructuralPartialEq for StructureBuilder<'a>[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.