Enum dbus::MessageItem [] [src]

pub enum MessageItem {
    Array(Vec<MessageItem>, TypeSig<'static>),
    Struct(Vec<MessageItem>),
    Variant(Box<MessageItem>),
    DictEntry(Box<MessageItem>, Box<MessageItem>),
    ObjectPath(String),
    Str(String),
    Bool(bool),
    Byte(u8),
    Int16(i16),
    Int32(i32),
    Int64(i64),
    UInt16(u16),
    UInt32(u32),
    UInt64(u64),
    Double(f64),
    UnixFd(OwnedFd),
}

MessageItem - used as parameters and return values from method calls, or as data added to a signal.

Variants

A D-Bus array requires all elements to be of the same type. All elements must match the TypeSig.

A D-Bus struct allows for values of different types.

A D-Bus variant is a wrapper around another MessageItem, which can be of any type.

A D-Bus dictionary is an Array of DictEntry items.

A D-Bus objectpath requires its content to be a valid objectpath, so not all strings are allowed here.

D-Bus allows for sending file descriptors, which can be used to set up SHM, unix pipes, or other communication channels.

Methods

impl MessageItem
[src]

Creates a (String, Variant) dictionary from an iterator with Result passthrough (an Err will abort and return that Err)

Creates an MessageItem::Array from a list of MessageItems.

Conveniently get the inner value of a MessageItem

Example

use dbus::MessageItem;
let m: MessageItem = 5i64.into();
let s: i64 = m.inner().unwrap();
assert_eq!(s, 5i64);

Trait Implementations

impl Clone for MessageItem
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialOrd for MessageItem
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq for MessageItem
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for MessageItem
[src]

Formats the value using the given formatter.

impl From<u8> for MessageItem
[src]

Performs the conversion.

impl From<u64> for MessageItem
[src]

Performs the conversion.

impl From<u32> for MessageItem
[src]

Performs the conversion.

impl From<u16> for MessageItem
[src]

Performs the conversion.

impl From<i16> for MessageItem
[src]

Performs the conversion.

impl From<i32> for MessageItem
[src]

Performs the conversion.

impl From<i64> for MessageItem
[src]

Performs the conversion.

impl From<f64> for MessageItem
[src]

Performs the conversion.

impl From<bool> for MessageItem
[src]

Performs the conversion.

impl<'a, T> From<&'a [T]> for MessageItem where T: Into<MessageItem> + Clone + Default
[src]

Create a MessageItem::Array.

Performs the conversion.

impl<'a> From<&'a str> for MessageItem
[src]

Performs the conversion.

impl From<String> for MessageItem
[src]

Performs the conversion.

impl From<OwnedFd> for MessageItem
[src]

Performs the conversion.

impl From<Box<MessageItem>> for MessageItem
[src]

Create a MessageItem::Variant

Performs the conversion.

impl From<(MessageItem, MessageItem)> for MessageItem
[src]

Create a MessageItem::DictEntry

Performs the conversion.

impl<'a> FromMessageItem<'a> for &'a MessageItem
[src]

impl PropertyROHandler for MessageItem
[src]