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
impl Ack
Sourcepub fn annotation(annotation_id: AnnotationId) -> Self
pub fn annotation(annotation_id: AnnotationId) -> Self
Ack an annotation.
Sourcepub fn with_display(self, display: DisplayInfo) -> Self
pub fn with_display(self, display: DisplayInfo) -> Self
Attach display metadata.
Sourcepub fn with_resolution(self, coords: LogicalPoint, confidence: f64) -> Self
pub fn with_resolution(self, coords: LogicalPoint, confidence: f64) -> Self
Attach what a resolver produced.