pub struct ResponseHeader {
pub ok: bool,
pub error: Option<String>,
pub x: Option<i32>,
pub y: Option<i32>,
pub exit_code: Option<i32>,
pub payload_len: u32,
}Expand description
JSON header of a response frame (guest → host). ok reports success;
on failure error carries a message and no payload follows. x/y
carry the pointer position: Action::CursorPosition reports it, and the
pointer actions (move / clicks / drag / scroll) echo the resulting
position so a caller can verify where the pointer actually landed.
exit_code is populated by
Action::ExecCapture (None ⇒ the command did not exit cleanly, e.g.
it timed out). payload_len is the count of binary bytes (e.g. PNG)
following this header in the frame.
Fields§
§ok: bool§error: Option<String>§x: Option<i32>§y: Option<i32>§exit_code: Option<i32>§payload_len: u32Implementations§
Trait Implementations§
Source§impl Clone for ResponseHeader
impl Clone for ResponseHeader
Source§fn clone(&self) -> ResponseHeader
fn clone(&self) -> ResponseHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseHeader
impl Debug for ResponseHeader
Source§impl<'de> Deserialize<'de> for ResponseHeader
impl<'de> Deserialize<'de> for ResponseHeader
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
Source§impl PartialEq for ResponseHeader
impl PartialEq for ResponseHeader
Source§fn eq(&self, other: &ResponseHeader) -> bool
fn eq(&self, other: &ResponseHeader) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResponseHeader
impl Serialize for ResponseHeader
impl StructuralPartialEq for ResponseHeader
Auto Trait Implementations§
impl Freeze for ResponseHeader
impl RefUnwindSafe for ResponseHeader
impl Send for ResponseHeader
impl Sync for ResponseHeader
impl Unpin for ResponseHeader
impl UnsafeUnpin for ResponseHeader
impl UnwindSafe for ResponseHeader
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