Trait MessageConversionExt

Source
pub trait MessageConversionExt<B>: MessageConversion<Body = B>
where B: Type + Serialize + for<'a> Deserialize<'a>,
{ // Required method fn try_from_message(msg: &Message) -> Result<Self, AtspiError> where Self: Sized; // Provided methods fn validate_interface(msg: &Message) -> Result<(), AtspiError> { ... } fn validate_member(msg: &Message) -> Result<(), AtspiError> { ... } fn validate_body(msg: &Message) -> Result<(), AtspiError> { ... } }

Required Methods§

Source

fn try_from_message(msg: &Message) -> Result<Self, AtspiError>
where Self: Sized,

Convert a zbus::Message into this event type. Does all the validation for you.

§Errors

See MessageConversion::from_message_unchecked for info on panic condition that should never happen.

Provided Methods§

Source

fn validate_interface(msg: &Message) -> Result<(), AtspiError>

Validate the interface string via zbus::message::Header::interface against Self’s assignment of BusProperties::DBUS_INTERFACE

§Errors
Source

fn validate_member(msg: &Message) -> Result<(), AtspiError>

Validate the member string via zbus::message::Header::member against Self’s assignment of BusProperties::DBUS_MEMBER

§Errors
Source

fn validate_body(msg: &Message) -> Result<(), AtspiError>

Validate the body signature against the zvariant::Signature of MessageConversion::Body

§Errors

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§