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>,
}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.
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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ack
impl<'de> Deserialize<'de> for Ack
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>,
Deserialize this value from the given Serde deserializer. Read more
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more