pub struct DbusMessageEncoder { /* private fields */ }Expand description
Encoder for little-endian D-Bus wire protocol binary messages.
Implementations§
Source§impl DbusMessageEncoder
impl DbusMessageEncoder
Sourcepub fn push_string(&mut self, val: &str)
pub fn push_string(&mut self, val: &str)
Appends a D-Bus String (4-byte length + bytes + null terminator).
Sourcepub fn push_object_path(&mut self, path: &str)
pub fn push_object_path(&mut self, path: &str)
Appends a D-Bus ObjectPath (4-byte length + bytes + null terminator).
Sourcepub fn push_signature(&mut self, sig: &str)
pub fn push_signature(&mut self, sig: &str)
Appends a D-Bus Signature (1-byte length + bytes + null terminator).
Source§impl DbusMessageEncoder
impl DbusMessageEncoder
Sourcepub fn push_bool(&mut self, val: bool)
pub fn push_bool(&mut self, val: bool)
Appends a D-Bus boolean (b) encoded as an aligned u32 (0 or 1).
Sourcepub fn push_string_array(&mut self, items: &[&str])
pub fn push_string_array(&mut self, items: &[&str])
Appends a D-Bus array of strings (as).
Sourcepub fn push_variant(&mut self, val: &DbusVariantValue)
pub fn push_variant(&mut self, val: &DbusVariantValue)
Appends a D-Bus variant (v).
Sourcepub fn push_dict_sv(&mut self, entries: &[(&str, DbusVariantValue)])
pub fn push_dict_sv(&mut self, entries: &[(&str, DbusVariantValue)])
Appends a D-Bus a{sv} dictionary with exact 8-byte struct/dict-entry alignment.
Trait Implementations§
Source§impl Debug for DbusMessageEncoder
impl Debug for DbusMessageEncoder
Auto Trait Implementations§
impl Forget for DbusMessageEncoder
impl Freeze for DbusMessageEncoder
impl Move for DbusMessageEncoder
impl RefUnwindSafe for DbusMessageEncoder
impl Send for DbusMessageEncoder
impl Sync for DbusMessageEncoder
impl Unpin for DbusMessageEncoder
impl UnsafeUnpin for DbusMessageEncoder
impl UnwindSafe for DbusMessageEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more