[−][src]Struct zvariant::Structure
A helper type to wrap structs in Value
.
API is provided to convert from, and to tuples.
Implementations
impl<'a> Structure<'a>
[src]
pub fn fields(&self) -> &[Value<'a>]ⓘ
[src]
Get a reference to all the fields of self
.
pub fn new() -> Self
[src]
Please use StructureBuilder
to create a Structure
instead.
Create a new Structure
.
Same as Structure::default()
.
pub fn add_field<T>(self, field: T) -> Self where
T: Type + Into<Value<'a>>,
[src]
T: Type + Into<Value<'a>>,
Please use StructureBuilder
to create a Structure
instead.
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]
Please use StructureBuilder
to create a Structure
instead.
Append field
to self
.
Identical to add_field
, except the field must be in the form of a Value
.
pub fn signature(&self) -> Signature<'static>
[src]
Get the signature of this Structure
.
NB: This method potentially allocates and copies. Use full_signature
if you'd like to
avoid that.
pub fn full_signature(&self) -> &Signature<'_>
[src]
Get the signature of this Structure
.
Trait Implementations
impl<'a> Clone for Structure<'a>
[src]
impl<'a> Debug for Structure<'a>
[src]
impl<'a> Default for Structure<'a>
[src]
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
T12: Type + Into<Value<'a>>,
T13: Type + Into<Value<'a>>,
T14: Type + Into<Value<'a>>,
T15: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
T12: Type + Into<Value<'a>>,
T13: Type + Into<Value<'a>>,
T14: Type + Into<Value<'a>>,
T15: Type + Into<Value<'a>>,
pub fn from(
value: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
) -> Self
[src]
value: (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
) -> Self
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
T12: Type + Into<Value<'a>>,
T13: Type + Into<Value<'a>>,
T14: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
T12: Type + Into<Value<'a>>,
T13: Type + Into<Value<'a>>,
T14: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
T12: Type + Into<Value<'a>>,
T13: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
T12: Type + Into<Value<'a>>,
T13: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
T12: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
T12: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
T11: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
T10: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
T9: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7, T8> From<(T0, T1, T2, T3, T4, T5, T6, T7, T8)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
T8: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5, T6, T7> From<(T0, T1, T2, T3, T4, T5, T6, T7)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
T7: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5, T6> From<(T0, T1, T2, T3, T4, T5, T6)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
T6: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4, T5> From<(T0, T1, T2, T3, T4, T5)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
T5: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3, T4> From<(T0, T1, T2, T3, T4)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
T4: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2, T3> From<(T0, T1, T2, T3)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
T3: Type + Into<Value<'a>>,
impl<'a, T0, T1, T2> From<(T0, T1, T2)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
T2: Type + Into<Value<'a>>,
impl<'a, T0, T1> From<(T0, T1)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
T1: Type + Into<Value<'a>>,
impl<'a, T0> From<(T0,)> for Structure<'a> where
T0: Type + Into<Value<'a>>,
[src]
T0: Type + Into<Value<'a>>,
impl<'a> PartialEq<Structure<'a>> for Structure<'a>
[src]
pub fn eq(&self, other: &Structure<'a>) -> bool
[src]
pub fn ne(&self, other: &Structure<'a>) -> bool
[src]
impl<'a> Serialize for Structure<'a>
[src]
impl<'a> StructuralPartialEq for Structure<'a>
[src]
impl<'a> TryFrom<&'a OwnedValue> for &'a Structure<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a Value<'a>> for &'a Structure<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(value: &'a Value<'a>) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a Value<'a>> for Structure<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(value: &'a Value<'_>) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<OwnedValue> for Structure<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(v: OwnedValue) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<Value<'a>> for Structure<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Structure<'a>
[src]
impl<'a> Send for Structure<'a>
[src]
impl<'a> Sync for Structure<'a>
[src]
impl<'a> Unpin for Structure<'a>
[src]
impl<'a> UnwindSafe for Structure<'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>,