pub trait Encode {
const ALIGNMENT: Alignment;
// Required method
fn encode(&self, raw: &mut Raw<'_>);
}Expand description
A Rust value which can be written to a D-Bus message body.
This is implemented for the owned types that generated code uses, and for their borrowed counterparts so that a client does not have to allocate in order to make a call.
§Examples
use tokio_dbus::Signature;
use tokio_dbus_runtime::Arguments;
let mut arguments = Arguments::new(Signature::new("sas")?)?;
arguments.store("Hello");
arguments.store(&["a", "b"][..]);Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".