pub struct StateChangedEvent {
pub item: ObjectRef,
pub state: State,
pub enabled: bool,
}
Expand description
A state of an object has been modified.
A State
can be added or removed from any crate::ObjectRef
.
Fields§
§item: ObjectRef
The crate::ObjectRef
which the event applies to.
state: State
The state to be enabled/disabled.
enabled: bool
Whether the state was enabled or disabled.
Trait Implementations§
Source§impl BusProperties for StateChangedEvent
impl BusProperties for StateChangedEvent
Source§const DBUS_MEMBER: &'static str = "StateChanged"
const DBUS_MEMBER: &'static str = "StateChanged"
The
DBus
member for the event.
For example, for an crate::events::object::TextChangedEvent
this should be "TextChanged"
Source§const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Object"
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Object"
The
DBus
interface name for this event.
For example, for any event within crate::events::object
, this should be “org.a11y.atspi.Event.Object”.Source§const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Object',member='StateChanged'"
const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Object',member='StateChanged'"
A static match rule string for
DBus
.
This should usually be a string that looks like this: "type='signal',interface='org.a11y.atspi.Event.Object',member='PropertyChange'"
;
This should be deprecated in favour of composing the string from Self::DBUS_MEMBER
and Self::DBUS_INTERFACE
.Source§const REGISTRY_EVENT_STRING: &'static str = "Object:"
const REGISTRY_EVENT_STRING: &'static str = "Object:"
A registry event string for registering for event receiving via the
RegistryProxy
.
This should be deprecated in favour of composing the string from Self::DBUS_MEMBER
and Self::DBUS_INTERFACE
.Source§impl Clone for StateChangedEvent
impl Clone for StateChangedEvent
Source§fn clone(&self) -> StateChangedEvent
fn clone(&self) -> StateChangedEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StateChangedEvent
impl Debug for StateChangedEvent
Source§impl Default for StateChangedEvent
impl Default for StateChangedEvent
Source§fn default() -> StateChangedEvent
fn default() -> StateChangedEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StateChangedEvent
impl<'de> Deserialize<'de> for StateChangedEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EventProperties for StateChangedEvent
impl EventProperties for StateChangedEvent
fn sender(&self) -> UniqueName<'_>
fn path(&self) -> ObjectPath<'_>
fn object_ref(&self) -> ObjectRef
Source§impl From<StateChangedEvent> for Event
impl From<StateChangedEvent> for Event
Source§fn from(event_variant: StateChangedEvent) -> Event
fn from(event_variant: StateChangedEvent) -> Event
Converts to this type from the input type.
Source§impl From<StateChangedEvent> for EventBodyOwned
impl From<StateChangedEvent> for EventBodyOwned
Source§fn from(event: StateChangedEvent) -> Self
fn from(event: StateChangedEvent) -> Self
Converts to this type from the input type.
Source§impl From<StateChangedEvent> for ObjectEvents
impl From<StateChangedEvent> for ObjectEvents
Source§fn from(specific_event: StateChangedEvent) -> ObjectEvents
fn from(specific_event: StateChangedEvent) -> ObjectEvents
Converts to this type from the input type.
Source§impl Hash for StateChangedEvent
impl Hash for StateChangedEvent
Source§impl MessageConversion for StateChangedEvent
impl MessageConversion for StateChangedEvent
Source§type Body = EventBodyOwned
type Body = EventBodyOwned
What is the body type of this event.
Source§fn from_message_unchecked_parts(
item: ObjectRef,
body: Self::Body,
) -> Result<Self, AtspiError>
fn from_message_unchecked_parts( item: ObjectRef, body: Self::Body, ) -> Result<Self, AtspiError>
Build an event from an
ObjectRef
and Self::Body
.
This function will not check for any of the following error conditions: Read moreSource§fn from_message_unchecked(msg: &Message) -> Result<Self, AtspiError>
fn from_message_unchecked(msg: &Message) -> Result<Self, AtspiError>
Build an event from a
zbus::Message
reference.
This function will not check for any of the following error conditions: Read moreSource§impl PartialEq for StateChangedEvent
impl PartialEq for StateChangedEvent
Source§impl Serialize for StateChangedEvent
impl Serialize for StateChangedEvent
Source§impl TryFrom<&Message> for StateChangedEvent
impl TryFrom<&Message> for StateChangedEvent
Source§impl TryFrom<Event> for StateChangedEvent
impl TryFrom<Event> for StateChangedEvent
Source§impl TryFrom<StateChangedEvent> for Message
impl TryFrom<StateChangedEvent> for Message
Source§type Error = AtspiError
type Error = AtspiError
The type returned in the event of a conversion error.
impl Eq for StateChangedEvent
impl StructuralPartialEq for StateChangedEvent
Auto Trait Implementations§
impl Freeze for StateChangedEvent
impl RefUnwindSafe for StateChangedEvent
impl Send for StateChangedEvent
impl Sync for StateChangedEvent
impl Unpin for StateChangedEvent
impl UnwindSafe for StateChangedEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> EventTypeProperties for Twhere
T: BusProperties,
impl<T> EventTypeProperties for Twhere
T: BusProperties,
Source§impl<T> HasInterfaceName for Twhere
T: BusProperties,
impl<T> HasInterfaceName for Twhere
T: BusProperties,
Source§const DBUS_INTERFACE: &'static str = const DBUS_INTERFACE: &'static str = <T as BusProperties>::DBUS_INTERFACE;
const DBUS_INTERFACE: &'static str = const DBUS_INTERFACE: &'static str = <T as BusProperties>::DBUS_INTERFACE;
A static interface string for
DBus
.
This should usually be a string that looks like this: "org.a11y.atspi.Event.*"
;Source§impl<T> HasMatchRule for Twhere
T: BusProperties,
impl<T> HasMatchRule for Twhere
T: BusProperties,
Source§const MATCH_RULE_STRING: &'static str = const MATCH_RULE_STRING: &'static str =
<T as BusProperties>::MATCH_RULE_STRING;
const MATCH_RULE_STRING: &'static str = const MATCH_RULE_STRING: &'static str = <T as BusProperties>::MATCH_RULE_STRING;
A static match rule string for
DBus
.
This should usually be a string that looks like this: "type='signal',interface='org.a11y.atspi.Event.Object',member='PropertyChange'"
;
This should be deprecated in favour of composing the string from BusProperties::DBUS_MEMBER
and BusProperties::DBUS_INTERFACE
.Source§impl<T> HasRegistryEventString for Twhere
T: BusProperties,
impl<T> HasRegistryEventString for Twhere
T: BusProperties,
Source§const REGISTRY_EVENT_STRING: &'static str = const REGISTRY_EVENT_STRING: &'static str =
<T as BusProperties>::REGISTRY_EVENT_STRING;
const REGISTRY_EVENT_STRING: &'static str = const REGISTRY_EVENT_STRING: &'static str = <T as BusProperties>::REGISTRY_EVENT_STRING;
A registry event string for registering for event receiving via the
RegistryProxy
.
This should be deprecated in favour of composing the string from BusProperties::DBUS_MEMBER
and BusProperties::DBUS_INTERFACE
.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> MessageConversionExt<EventBodyOwned> for Twhere
T: MessageConversion<Body = EventBodyOwned>,
impl<T> MessageConversionExt<EventBodyOwned> for Twhere
T: MessageConversion<Body = EventBodyOwned>,
Source§fn try_from_message(msg: &Message) -> Result<T, AtspiError>
fn try_from_message(msg: &Message) -> Result<T, AtspiError>
Convert a
zbus::Message
into this event type.
Does all the validation for you. Read moreSource§fn validate_interface(msg: &Message) -> Result<(), AtspiError>
fn validate_interface(msg: &Message) -> Result<(), AtspiError>
Validate the interface string via
zbus::message::Header::interface
against Self
’s assignment of BusProperties::DBUS_INTERFACE
Read moreSource§fn validate_member(msg: &Message) -> Result<(), AtspiError>
fn validate_member(msg: &Message) -> Result<(), AtspiError>
Validate the member string via
zbus::message::Header::member
against Self
’s assignment of BusProperties::DBUS_MEMBER
Read more