pub struct EventBodyBorrowed<'a> {
pub kind: &'a str,
pub detail1: i32,
pub detail2: i32,
pub any_data: Value<'a>,
pub(crate) properties: Properties,
}Fields§
§kind: &'a strkind variant, used for specifying an event triple “object:state-changed:focused”, the “focus” part of this event is what is contained within the kind.
detail1: i32Generic detail1 value described by AT-SPI.
detail2: i32Generic detail2 value described by AT-SPI.
any_data: Value<'a>Generic any_data value described by AT-SPI.
This can be any type.
properties: PropertiesNot in use.
See: Properties.
Implementations§
Source§impl EventBodyBorrowed<'_>
impl EventBodyBorrowed<'_>
Sourcepub fn to_fully_owned(&self) -> Result<EventBodyOwned, AtspiError>
pub fn to_fully_owned(&self) -> Result<EventBodyOwned, AtspiError>
Convert this borrowed event body to an owned event body.
§Errors
This will error if the following conditions are met:
- the
any_datafield contains anstd::os::fd::OwnedFdtype, and - the maximum number of open files for the process is exceeded.
Chances are slim because none of the types in crate::events use std::os::fd::OwnedFd.
See zvariant::Value::try_clone for more information.
Trait Implementations§
Source§impl Clone for EventBodyBorrowed<'_>
impl Clone for EventBodyBorrowed<'_>
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
§Safety
This implementation of Clone can panic! although chances are slim.
If the following conditions are met:
- the
any_datafield contains anstd::os::fd::OwnedFdtype, and - the maximum number of open files for the process is exceeded.
Then this function panic.
None of the types in crate::events use std::os::fd::OwnedFd.
Events on the AT-SPI bus could, theoretically send a file descriptor, but nothing in the current
specification describes that.
See zvariant::Value::try_clone for more information.
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for EventBodyBorrowed<'a>
impl<'a> Debug for EventBodyBorrowed<'a>
Source§impl Default for EventBodyBorrowed<'_>
impl Default for EventBodyBorrowed<'_>
Source§impl<'de: 'a, 'a> Deserialize<'de> for EventBodyBorrowed<'a>
impl<'de: 'a, 'a> Deserialize<'de> for EventBodyBorrowed<'a>
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>,
Source§impl<'a> From<EventBodyBorrowed<'a>> for EventBodyQtOwned
impl<'a> From<EventBodyBorrowed<'a>> for EventBodyQtOwned
Source§fn from(borrowed: EventBodyBorrowed<'a>) -> Self
fn from(borrowed: EventBodyBorrowed<'a>) -> Self
Source§impl<'b> From<EventBodyBorrowed<'b>> for EventBody<'b>
impl<'b> From<EventBodyBorrowed<'b>> for EventBody<'b>
Source§fn from(borrowed: EventBodyBorrowed<'b>) -> Self
fn from(borrowed: EventBodyBorrowed<'b>) -> Self
Source§impl<'de> From<EventBodyQtBorrowed<'de>> for EventBodyBorrowed<'de>
impl<'de> From<EventBodyQtBorrowed<'de>> for EventBodyBorrowed<'de>
Source§fn from(borrow: EventBodyQtBorrowed<'de>) -> Self
fn from(borrow: EventBodyQtBorrowed<'de>) -> Self
Source§impl PartialEq<EventBodyBorrowed<'_>> for EventBodyQtBorrowed<'_>
impl PartialEq<EventBodyBorrowed<'_>> for EventBodyQtBorrowed<'_>
Source§fn eq(&self, other: &EventBodyBorrowed<'_>) -> bool
fn eq(&self, other: &EventBodyBorrowed<'_>) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialEq<EventBodyQtBorrowed<'_>> for EventBodyBorrowed<'_>
impl PartialEq<EventBodyQtBorrowed<'_>> for EventBodyBorrowed<'_>
Source§fn eq(&self, other: &EventBodyQtBorrowed<'_>) -> bool
fn eq(&self, other: &EventBodyQtBorrowed<'_>) -> bool
self and other values to be equal, and is used by ==.Source§impl<'a> PartialEq for EventBodyBorrowed<'a>
impl<'a> PartialEq for EventBodyBorrowed<'a>
Source§fn eq(&self, other: &EventBodyBorrowed<'a>) -> bool
fn eq(&self, other: &EventBodyBorrowed<'a>) -> bool
self and other values to be equal, and is used by ==.