Trait tokio_dbus::Storable

source ·
pub trait Storable: Sealed { }
Expand description

Trait used for types which can be stored with a store() call.

§Examples

use tokio_dbus::BodyBuf;

let mut body = BodyBuf::new();

body.store(10u16)?;
body.store("Hello World")?;

assert_eq!(body.signature(), "qs");

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Storable for &str

Storable implementation for &str.

§Examples

use tokio_dbus::BodyBuf;

let mut body = BodyBuf::new();

body.store(10u16)?;
body.store("Hello World")?;

assert_eq!(body.signature(), "qs");
source§

impl Storable for &[u8]

Storable implementation for &[u8].

§Examples

use tokio_dbus::BodyBuf;

let mut body = BodyBuf::new();

body.store(10u16)?;
body.store(&b"abcd"[..])?;

assert_eq!(body.signature(), "qay");
source§

impl Storable for f64

source§

impl Storable for i16

source§

impl Storable for i32

source§

impl Storable for i64

source§

impl Storable for u8

source§

impl Storable for u16

source§

impl Storable for u32

source§

impl Storable for u64

source§

impl Storable for String

Storable implementation for String.

§Examples

use tokio_dbus::BodyBuf;

let mut body = BodyBuf::new();

body.store(10u16)?;
body.store(String::from("Hello World"))?;

assert_eq!(body.signature(), "qs");
source§

impl Storable for MessageType

source§

impl Storable for Type

source§

impl Storable for Variant

Implementors§

source§

impl Storable for &ObjectPath

Storable implementation for &ObjectPath.

§Examples

use tokio_dbus::BodyBuf;
use tokio_dbus::ObjectPath;

let mut body = BodyBuf::new();

body.store(10u16)?;
body.store(ObjectPath::new("/se/tedro/DBusExample")?)?;

assert_eq!(body.signature(), "qo");
source§

impl Storable for &Signature

Storable implementation for &Signature.

§Examples

use tokio_dbus::BodyBuf;
use tokio_dbus::Signature;

let mut body = BodyBuf::new();

body.store(10u16)?;
body.store(Signature::new("us")?)?;

assert_eq!(body.signature(), "qg");
source§

impl Storable for tokio_dbus::Variant<'_>

source§

impl Storable for NameFlag

source§

impl Storable for NameReply

source§

impl Storable for Endianness

source§

impl Storable for Flags