pub trait MessageConversionExt<'a, B>: 'a + MessageConversion<'a, Body<'a> = B>{
// Required method
fn try_from_message(
msg: &'a Message,
hdr: &Header<'_>,
) -> Result<Self, AtspiError>
where Self: Sized + 'a;
// Provided methods
fn validate_interface(header: &Header<'_>) -> Result<(), AtspiError> { ... }
fn validate_member(hdr: &Header<'_>) -> Result<(), AtspiError> { ... }
fn validate_body(msg: &Message) -> Result<(), AtspiError> { ... }
}Required Methods§
Sourcefn try_from_message(
msg: &'a Message,
hdr: &Header<'_>,
) -> Result<Self, AtspiError>where
Self: Sized + 'a,
fn try_from_message(
msg: &'a Message,
hdr: &Header<'_>,
) -> Result<Self, AtspiError>where
Self: Sized + 'a,
Convert a zbus::Message into this event type.
Does all the validation for you.
§Errors
- The message does not have an interface:
AtspiError::MissingInterface - The message interface does not match the one for the event:
AtspiError::InterfaceMatch - The message does not have an member:
AtspiError::MissingMember - The message member does not match the one for the event:
AtspiError::MemberMatch - The message signature does not match the one for the event:
AtspiError::SignatureMatch
See MessageConversion::from_message_unchecked for info on panic condition that should never
happen.
Provided Methods§
Sourcefn validate_interface(header: &Header<'_>) -> Result<(), AtspiError>
fn validate_interface(header: &Header<'_>) -> Result<(), AtspiError>
Validate the interface string via zbus::message::Header::interface against Self’s assignment of DBusInterface::DBUS_INTERFACE
§Errors
AtspiError::MissingInterfaceif there is no interfaceAtspiError::InterfaceMatchif the interfaces do not match
Sourcefn validate_member(hdr: &Header<'_>) -> Result<(), AtspiError>
fn validate_member(hdr: &Header<'_>) -> Result<(), AtspiError>
Validate the member string via zbus::message::Header::member against Self’s assignment of DBusMember::DBUS_MEMBER
§Errors
AtspiError::MissingMemberif there is no memberAtspiError::MemberMatchif the members do not match
Sourcefn validate_body(msg: &Message) -> Result<(), AtspiError>
fn validate_body(msg: &Message) -> Result<(), AtspiError>
Validate the body signature against the zvariant::Signature of MessageConversion::Body
§Errors
AtspiError::SignatureMatchif the signatures do not match
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl MessageConversionExt<'_, LegacyCacheItem> for LegacyAddAccessibleEvent
Available on crate feature
zbus only.impl<'a> MessageConversionExt<'a, CacheItem> for AddAccessibleEvent
Available on crate feature
zbus only.impl<'a> MessageConversionExt<'a, EventListeners> for EventListenerDeregisteredEvent
Available on crate feature
zbus only.impl<'a> MessageConversionExt<'a, EventListeners> for EventListenerRegisteredEvent
Available on crate feature
zbus only.impl<'a> MessageConversionExt<'a, ObjectRef<'a>> for AvailableEvent
Available on crate feature
zbus only.impl<'a> MessageConversionExt<'a, ObjectRefOwned> for RemoveAccessibleEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for AbsEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ActivateEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ActiveDescendantChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for AnnouncementEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ApplicationChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for atspi_common::events::document::AttributesChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for atspi_common::events::object::AttributesChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for BoundsChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ButtonEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for CharWidthChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ChildrenChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for CloseEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ColumnCountChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ColumnDeletedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ColumnInsertedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ColumnReorderedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ContentChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for CreateEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for DeactivateEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for DesktopCreateEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for DesktopDestroyEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for DestroyEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for FocusEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for LineChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for LineCountChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for LinkSelectedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for LoadCompleteEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for LoadStoppedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for LowerEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for MaximizeEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for MinimizeEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ModelChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ModifiersEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for MoveEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for PageChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for atspi_common::events::object::PropertyChangeEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for atspi_common::events::window::PropertyChangeEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for RaiseEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for RelEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ReloadEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ReparentEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ResizeEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for RestoreEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for RestyleEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for RowDeletedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for RowInsertedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for RowReorderedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for SelectionChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for ShadeEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for StateChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for TextAttributesChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for TextBoundsChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for TextCaretMovedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for TextChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for TextSelectionChangedEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for UUshadeEvent
Available on crate feature
zbus only.impl<'msg> MessageConversionExt<'msg, EventBody<'msg>> for VisibleDataChangedEvent
Available on crate feature
zbus only.