Skip to main content

MessageConversion

Trait MessageConversion 

Source
pub trait MessageConversion<'a>: DBusProperties {
    type Body<'msg>: Type + Deserialize<'msg> + Serialize
       where Self: 'msg;

    // Required methods
    fn from_message_unchecked(
        msg: &Message,
        header: &Header<'_>,
    ) -> Result<Self, AtspiError>
       where Self: Sized + 'a;
    fn from_message_unchecked_parts(
        obj_ref: ObjectRef<'_>,
        body: Body,
    ) -> Result<Self, AtspiError>
       where Self: Sized;
    fn body(&self) -> Self::Body<'_>;
}

Required Associated Types§

Source

type Body<'msg>: Type + Deserialize<'msg> + Serialize where Self: 'msg

What is the body type of this event.

Required Methods§

Source

fn from_message_unchecked( msg: &Message, header: &Header<'_>, ) -> Result<Self, AtspiError>
where Self: Sized + 'a,

Build an event from a zbus::Message reference. This function will not check for any of the following error conditions:

Therefore, this should only be used when one has checked the above conditions. These must be checked manually. Alternatively, there is the MessageConversionExt::try_from_message that will check these conditions for you.

This type also implements TryFrom<&zbus::Message>; consider using this if you are not an internal developer.

§Errors

It is possible to get a AtspiError::Zvariant error if you do not check the proper conditions before calling this.

Source

fn from_message_unchecked_parts( obj_ref: ObjectRef<'_>, body: Body, ) -> Result<Self, AtspiError>
where Self: Sized,

Build an event from an ObjectRef and Self::Body. This function will not check for any of the following error conditions:

Therefore, this should only be used when one has checked the above conditions.

§Errors

Some Self::Body types may fallibly convert data fields contained in the body. If this happens, then the function will return an error.

Source

fn body(&self) -> Self::Body<'_>

The body of the object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl MessageConversion<'_> for AbsEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for ActivateEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ActiveDescendantChangedEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for AddAccessibleEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = CacheItem

Source§

impl MessageConversion<'_> for AnnouncementEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for ApplicationChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for atspi_proxies::events::document::AttributesChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for atspi_proxies::events::object::AttributesChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for AvailableEvent

Available on crate feature zbus only.
Source§

type Body<'a> = ObjectRef<'a>

Source§

impl MessageConversion<'_> for BoundsChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ButtonEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for CharWidthChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ChildrenChangedEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for CloseEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ColumnCountChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ColumnDeletedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ColumnInsertedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ColumnReorderedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ContentChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for CreateEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for DeactivateEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for DesktopCreateEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for DesktopDestroyEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for DestroyEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for EventListenerDeregisteredEvent

Available on crate feature zbus only.
Source§

impl MessageConversion<'_> for EventListenerRegisteredEvent

Available on crate feature zbus only.
Source§

impl MessageConversion<'_> for FocusEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for LegacyAddAccessibleEvent

Available on crate feature zbus only.
Source§

impl MessageConversion<'_> for LineChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for LineCountChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for LinkSelectedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for LoadCompleteEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for LoadStoppedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for LowerEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for MaximizeEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for MinimizeEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ModelChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ModifiersEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for MoveEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for PageChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for atspi_proxies::events::object::PropertyChangeEvent

Available on crate feature zbus only.
Source§

type Body<'b> = EventBody<'b>

Source§

impl MessageConversion<'_> for atspi_proxies::events::window::PropertyChangeEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for RaiseEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for RelEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for ReloadEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for RemoveAccessibleEvent

Available on crate feature zbus only.
Source§

impl MessageConversion<'_> for ReparentEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ResizeEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for RestoreEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for RestyleEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for RowDeletedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for RowInsertedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for RowReorderedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for SelectionChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for ShadeEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for StateChangedEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for TextAttributesChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for TextBoundsChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for TextCaretMovedEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for TextChangedEvent

Available on crate feature zbus only.
Source§

type Body<'a> = EventBody<'a>

Source§

impl MessageConversion<'_> for TextSelectionChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for UUshadeEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>

Source§

impl MessageConversion<'_> for VisibleDataChangedEvent

Available on crate feature zbus only.
Source§

type Body<'msg> = EventBody<'msg>