[−][src]Struct zvariant::StructureBuilder
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]
T: Type + Into<Value<'a>>,
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]
pub fn clone(&self) -> StructureBuilder<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for StructureBuilder<'a>
[src]
impl<'a> Default for StructureBuilder<'a>
[src]
pub fn default() -> StructureBuilder<'a>
[src]
impl<'a> PartialEq<StructureBuilder<'a>> for StructureBuilder<'a>
[src]
pub fn eq(&self, other: &StructureBuilder<'a>) -> bool
[src]
pub fn ne(&self, other: &StructureBuilder<'a>) -> bool
[src]
impl<'a> StructuralPartialEq for StructureBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for StructureBuilder<'a>
[src]
impl<'a> Send for StructureBuilder<'a>
[src]
impl<'a> Sync for StructureBuilder<'a>
[src]
impl<'a> Unpin for StructureBuilder<'a>
[src]
impl<'a> UnwindSafe for StructureBuilder<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,