[−][src]Struct zvariant::Array
Implementations
impl<'a> Array<'a>
[src]
pub fn new(element_signature: Signature<'_>) -> Array<'_>
[src]
Create a new empty Array
, given the signature of the elements.
pub fn append<'e: 'a>(&mut self, element: Value<'e>) -> Result<()>
[src]
Append element
.
Errors
if element
's signature doesn't match the element signature self
was created for.
pub fn get(&self) -> &[Value<'a>]
[src]
Get all the elements.
pub fn len(&self) -> usize
[src]
Get the number of elements.
pub fn is_empty(&self) -> bool
[src]
pub fn signature(&self) -> Signature<'static>
[src]
Get the signature of this Array
.
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 Array
.
pub fn element_signature(&self) -> &Signature<'_>
[src]
Get the signature of the elements in the Array
.
Trait Implementations
impl<'a> Clone for Array<'a>
[src]
impl<'a> Debug for Array<'a>
[src]
impl<'a> Deref for Array<'a>
[src]
type Target = [Value<'a>]
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'a, T, '_> From<&'_ [T]> for Array<'a> where
T: Type + Into<Value<'a>> + Clone,
[src]
T: Type + Into<Value<'a>> + Clone,
impl<'a, T, '_> From<&'_ Vec<T>> for Array<'a> where
T: Type + Into<Value<'a>> + Clone,
[src]
T: Type + Into<Value<'a>> + Clone,
impl<'a> From<&'a Array<'a>> for Value<'a>
[src]
impl<'a> From<Array<'a>> for Value<'a>
[src]
impl<'a, T> From<Vec<T>> for Array<'a> where
T: Type + Into<Value<'a>>,
[src]
T: Type + Into<Value<'a>>,
impl<'a> PartialEq<Array<'a>> for Array<'a>
[src]
impl<'a> Serialize for Array<'a>
[src]
impl<'a> StructuralPartialEq for Array<'a>
[src]
impl<'a> TryFrom<&'a OwnedValue> for &'a Array<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(v: &'a OwnedValue) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a Value<'a>> for &'a Array<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: &'a Value<'a>) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<&'a Value<'a>> for Array<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: &'a Value<'_>) -> Result<Self, Self::Error>
[src]
impl<'a, T> TryFrom<Array<'a>> for Vec<T> where
T: TryFrom<Value<'a>>,
[src]
T: TryFrom<Value<'a>>,
type Error = Error
The type returned in the event of a conversion error.
fn try_from(v: Array<'a>) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<OwnedValue> for Array<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(v: OwnedValue) -> Result<Self, Self::Error>
[src]
impl<'a> TryFrom<Value<'a>> for Array<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Array<'a>
impl<'a> Send for Array<'a>
impl<'a> Sync for Array<'a>
impl<'a> Unpin for Array<'a>
impl<'a> UnwindSafe for Array<'a>
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>,