pub struct EventBodyBorrowed<'a> {
pub kind: &'a str,
pub detail1: i32,
pub detail2: i32,
pub any_data: Value<'a>,
/* private fields */
}
Fields§
§kind: &'a str
kind 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: i32
Generic detail1 value described by AT-SPI.
detail2: i32
Generic detail2 value described by AT-SPI.
any_data: Value<'a>
Generic any_data
value described by AT-SPI.
This can be any type.
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_data
field contains an [std::os::fd::OwnedFd
] type, 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_data
field contains an [std::os::fd::OwnedFd
] type, 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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more