pub struct EventBodyQtBorrowed<'m> {
pub kind: &'m str,
pub detail1: i32,
pub detail2: i32,
pub any_data: Value<'m>,
/* private fields */
}
Fields§
§kind: &'m 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<'m>
Generic any_data
value described by AT-SPI.
This can be any type.
Implementations§
Source§impl EventBodyQtBorrowed<'_>
impl EventBodyQtBorrowed<'_>
Sourcepub fn try_to_owned(&self) -> Result<EventBodyQtOwned, AtspiError>
pub fn try_to_owned(&self) -> Result<EventBodyQtOwned, AtspiError>
Convert partially borrowed Qt 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.
Trait Implementations§
Source§impl Clone for EventBodyQtBorrowed<'_>
impl Clone for EventBodyQtBorrowed<'_>
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 panics.
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