pub struct MicrovmResponseWire {
pub microvm_id: String,
pub state: String,
pub endpoint: String,
pub image_arn: String,
pub image_version: String,
pub state_reason: Option<String>,
pub idle_policy: Option<IdlePolicy>,
pub maximum_duration_in_seconds: Option<u32>,
pub started_at: Option<f64>,
pub terminated_at: Option<f64>,
}Expand description
RunMicrovmResponse and GetMicrovmResponse — identical in every member this client
reads, so one type serves both.
One type rather than two because the two shapes agree on all seven required members
and both carry state, endpoint, and stateReason; a second type would be a
second place to keep the spelling right.
Fields§
§microvm_id: String§state: String§endpoint: String§image_arn: String§image_version: String§state_reason: Option<String>Optional in the model, and the absence is information: TRAP-8’s message says so rather than printing an empty string.
idle_policy: Option<IdlePolicy>§maximum_duration_in_seconds: Option<u32>maximumDurationInSeconds. Not required by the model, so absence parses.
started_at: Option<f64>startedAt, epoch seconds: when the VM first started. Absent on a launch reply.
terminated_at: Option<f64>terminatedAt, epoch seconds. Present once the VM has terminated.
Trait Implementations§
Source§impl Clone for MicrovmResponseWire
impl Clone for MicrovmResponseWire
Source§impl Debug for MicrovmResponseWire
impl Debug for MicrovmResponseWire
Source§impl<'de> Deserialize<'de> for MicrovmResponseWire
impl<'de> Deserialize<'de> for MicrovmResponseWire
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 From<MicrovmResponseWire> for Microvm
impl From<MicrovmResponseWire> for Microvm
Source§fn from(wire: MicrovmResponseWire) -> Self
fn from(wire: MicrovmResponseWire) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MicrovmResponseWire
impl RefUnwindSafe for MicrovmResponseWire
impl Send for MicrovmResponseWire
impl Sync for MicrovmResponseWire
impl Unpin for MicrovmResponseWire
impl UnsafeUnpin for MicrovmResponseWire
impl UnwindSafe for MicrovmResponseWire
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