Skip to main content

Ack

Struct Ack 

Source
pub struct Ack {
    pub session_id: Option<SessionId>,
    pub annotation_id: Option<AnnotationId>,
    pub resolved_coords: Option<LogicalPoint>,
    pub confidence: Option<f64>,
    pub display: Option<DisplayInfo>,
    pub activated: Option<Activated>,
    pub appeared: Option<bool>,
}
Expand description

A client message was accepted.

A session start acks with session_id and no annotation. Everything else acks with annotation_id. Resolver-backed requests additionally carry what was resolved and how confident the resolver was.

Fields§

§session_id: Option<SessionId>

Present on the ack for a session start.

§annotation_id: Option<AnnotationId>

Present on the ack for an annotation.

§resolved_coords: Option<LogicalPoint>

Where a query landed. Only for query-form requests.

§confidence: Option<f64>

How sure the resolver was, in 0.0..=1.0. Only for query-form requests.

The daemon, not the client, decides what to draw from this. It is reported so clients can phrase themselves honestly, not so they can pick a rendering.

§display: Option<DisplayInfo>

Scale and size of the display involved, so clients can convert screenshot pixels.

§activated: Option<Activated>

What was brought forward. Only for a focus request.

§appeared: Option<bool>

Whether the window turned up. Only for an await_window request.

false is an answer rather than a failure: the user was asked to go somewhere and has not, which is a thing a client should handle rather than an error it should report. Waiting longer, asking again, or giving up are all reasonable, and only the client knows which.

Implementations§

Source§

impl Ack

Source

pub fn session(session_id: SessionId) -> Self

Ack a session start.

Source

pub fn annotation(annotation_id: AnnotationId) -> Self

Ack an annotation.

Source

pub fn with_display(self, display: DisplayInfo) -> Self

Attach display metadata.

Source

pub fn with_resolution(self, coords: LogicalPoint, confidence: f64) -> Self

Attach what a resolver produced.

Source

pub fn appeared(appeared: bool) -> Self

Ack a wait with whether the window turned up.

Source

pub fn activated(app: Activated) -> Self

Ack a focus request with what came forward.

Carries no annotation id, because nothing was drawn. This is the one ack that reports a change to the user’s screen rather than to what is over it.

Trait Implementations§

Source§

impl Clone for Ack

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ack

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Ack

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Ack

Source§

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 PartialEq for Ack

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Ack

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Ack

Auto Trait Implementations§

§

impl Freeze for Ack

§

impl RefUnwindSafe for Ack

§

impl Send for Ack

§

impl Sync for Ack

§

impl Unpin for Ack

§

impl UnsafeUnpin for Ack

§

impl UnwindSafe for Ack

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.