[][src]Enum rustbus::params::Container

pub enum Container<'e, 'a: 'e> {
    Array(Array<'e, 'a>),
    Struct(Vec<Param<'a, 'e>>),
    Dict(Dict<'a, 'e>),
    Variant(Box<Variant<'a, 'e>>),
    ArrayRef(ArrayRef<'a, 'e>),
    StructRef(&'a [Param<'a, 'e>]),
    DictRef(DictRef<'a, 'e>),
}

The container types a message can have as parameters

'a is the lifetime of the Container, 'e the liftime of the params which may be longer

Variants

Array(Array<'e, 'a>)
Struct(Vec<Param<'a, 'e>>)
Dict(Dict<'a, 'e>)
Variant(Box<Variant<'a, 'e>>)
ArrayRef(ArrayRef<'a, 'e>)
StructRef(&'a [Param<'a, 'e>])
DictRef(DictRef<'a, 'e>)

Implementations

impl<'e, 'a: 'e> Container<'a, 'e>[src]

pub fn push<P: Into<Param<'a, 'e>>>(&mut self, new: P) -> Result<()>[src]

pub fn insert<K: Into<Base<'a>>, V: Into<Param<'a, 'e>>>(
    &mut self,
    key: K,
    val: V
) -> Result<()>
[src]

impl<'e, 'a: 'e> Container<'a, 'e>[src]

pub fn make_struct<P: Into<Param<'a, 'e>>>(
    elements: Vec<P>
) -> Container<'a, 'e>
[src]

pub fn make_struct_ref(elements: &'a [Param<'a, 'e>]) -> Container<'a, 'e>[src]

pub fn make_struct1<P: Into<Param<'a, 'e>>>(e1: P) -> Container<'a, 'e>[src]

pub fn make_struct2<P1: Into<Param<'a, 'e>>, P2: Into<Param<'a, 'e>>>(
    e1: P1,
    e2: P2
) -> Container<'a, 'e>
[src]

pub fn make_struct3<P1: Into<Param<'a, 'e>>, P2: Into<Param<'a, 'e>>, P3: Into<Param<'a, 'e>>>(
    e1: P1,
    e2: P2,
    e3: P3
) -> Container<'a, 'e>
[src]

pub fn make_variant<P: Into<Param<'a, 'e>>>(element: P) -> Container<'a, 'e>[src]

pub fn make_array_ref(
    element_sig: &str,
    elements: &'a [Param<'a, 'e>]
) -> Result<Container<'a, 'e>>
[src]

pub fn make_array_ref_with_sig(
    element_sig: Type,
    elements: &'a [Param<'a, 'e>]
) -> Result<Container<'a, 'e>>
[src]

pub fn make_array<P: Into<Param<'a, 'e>>, I: Iterator<Item = P>>(
    element_sig: &str,
    elements: I
) -> Result<Container<'a, 'e>>
[src]

pub fn make_array_with_sig<P: Into<Param<'a, 'e>>, I: Iterator<Item = P>>(
    element_sig: Type,
    elements: I
) -> Result<Container<'a, 'e>>
[src]

pub fn make_dict<K: Into<Base<'e>>, V: Into<Param<'a, 'e>>, I: Iterator<Item = (K, V)>>(
    key_sig: &str,
    val_sig: &str,
    map: I
) -> Result<Container<'a, 'e>>
[src]

pub fn make_dict_with_sig<K: Into<Base<'e>>, V: Into<Param<'a, 'e>>, I: Iterator<Item = (K, V)>>(
    key_sig: Base,
    value_sig: Type,
    map: I
) -> Result<Container<'a, 'e>>
[src]

pub fn make_dict_ref(
    key_sig: &str,
    val_sig: &str,
    map: &'a DictMap<'_, '_>
) -> Result<Container<'a, 'e>>
[src]

pub fn make_dict_ref_with_sig(
    key_sig: Base,
    value_sig: Type,
    map: &'a DictMap<'_, '_>
) -> Result<Container<'a, 'e>>
[src]

impl<'a, 'e> Container<'a, 'e>[src]

pub fn make_signature(&self, buf: &mut String)[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn sig(&self) -> Type[src]

Trait Implementations

impl<'e, 'a: 'e> Clone for Container<'e, 'a>[src]

impl<'e, 'a: 'e> Debug for Container<'e, 'a>[src]

impl<'e, 'a: 'e> Eq for Container<'e, 'a>[src]

impl<'a, 'e> From<&'_ Container<'a, 'e>> for Container[src]

impl<'a, 'e> From<Container<'a, 'e>> for Param<'a, 'e>[src]

impl<'e, 'a: 'e> PartialEq<Container<'e, 'a>> for Container<'e, 'a>[src]

impl<'e, 'a: 'e> StructuralEq for Container<'e, 'a>[src]

impl<'e, 'a: 'e> StructuralPartialEq for Container<'e, 'a>[src]

impl<'a, 'e> TryFrom<(Base, Type, HashMap<Base<'a>, Param<'a, 'e>, RandomState>)> for Container<'a, 'e>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a, 'e> TryFrom<(Type, Vec<Param<'a, 'e>, Global>)> for Container<'a, 'e>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a, 'e> TryFrom<HashMap<Base<'a>, Param<'a, 'e>, RandomState>> for Container<'a, 'e>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'a, 'e> TryFrom<Vec<Param<'a, 'e>, Global>> for Container<'a, 'e>[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'e, 'a> RefUnwindSafe for Container<'e, 'a>[src]

impl<'e, 'a> Send for Container<'e, 'a>[src]

impl<'e, 'a> Sync for Container<'e, 'a>[src]

impl<'e, 'a> Unpin for Container<'e, 'a> where
    'a: 'e,
    'e: 'a, 
[src]

impl<'e, 'a> UnwindSafe for Container<'e, 'a>[src]

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.