Struct GuestToHostResponse
pub struct GuestToHostResponse {
pub result: i32,
pub tdi_state_before: i32,
pub tdi_state_after: i32,
pub response: Option<Response>,
}Expand description
Represents a response from a TDISP command sent to the host by a guest. The
active variant of response identifies the command that was processed and
carries any payload returned by that command.
Fields§
§result: i32The result status of the command.
tdi_state_before: i32The state of the TDI before the command was executed.
tdi_state_after: i32The state of the TDI after the command was executed.
response: Option<Response>The response and its payload. Exactly one variant must be set.
Implementations§
§impl GuestToHostResponse
impl GuestToHostResponse
pub fn result(&self) -> TdispGuestOperationErrorCode
pub fn result(&self) -> TdispGuestOperationErrorCode
Returns the enum value of result, or the default if the field is set to an invalid enum value.
pub fn set_result(&mut self, value: TdispGuestOperationErrorCode)
pub fn set_result(&mut self, value: TdispGuestOperationErrorCode)
Sets result to the provided enum value.
pub fn tdi_state_before(&self) -> TdispTdiState
pub fn tdi_state_before(&self) -> TdispTdiState
Returns the enum value of tdi_state_before, or the default if the field is set to an invalid enum value.
pub fn set_tdi_state_before(&mut self, value: TdispTdiState)
pub fn set_tdi_state_before(&mut self, value: TdispTdiState)
Sets tdi_state_before to the provided enum value.
pub fn tdi_state_after(&self) -> TdispTdiState
pub fn tdi_state_after(&self) -> TdispTdiState
Returns the enum value of tdi_state_after, or the default if the field is set to an invalid enum value.
pub fn set_tdi_state_after(&mut self, value: TdispTdiState)
pub fn set_tdi_state_after(&mut self, value: TdispTdiState)
Sets tdi_state_after to the provided enum value.
Trait Implementations§
§impl Clone for GuestToHostResponse
impl Clone for GuestToHostResponse
§fn clone(&self) -> GuestToHostResponse
fn clone(&self) -> GuestToHostResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for GuestToHostResponse
impl Debug for GuestToHostResponse
§impl Default for GuestToHostResponse
impl Default for GuestToHostResponse
§fn default() -> GuestToHostResponse
fn default() -> GuestToHostResponse
§impl GuestToHostResponseExt for GuestToHostResponse
impl GuestToHostResponseExt for GuestToHostResponse
§fn error_code(&self) -> Option<TdispGuestOperationErrorCode>
fn error_code(&self) -> Option<TdispGuestOperationErrorCode>
§fn response<T>(self) -> Result<T, TdispGuestOperationError>where
T: GuestToHostResponseVariant,
fn response<T>(self) -> Result<T, TdispGuestOperationError>where
T: GuestToHostResponseVariant,
TdispGuestOperationError::Success and the oneof variant matches T.
Returns the error code otherwise. Read more§impl Message for GuestToHostResponse
impl Message for GuestToHostResponse
§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self.