pub struct Instance {
pub id: String,
pub name: String,
pub description: String,
pub hostname: String,
pub memory: u64,
pub ncpus: u16,
pub project_id: String,
pub run_state: InstanceState,
pub time_created: DisplayOptionDateTime,
pub time_modified: DisplayOptionDateTime,
pub time_run_state_updated: DisplayOptionDateTime,
}
Expand description
Client view of an Instance
Fields§
§id: String
unique, immutable, system-controlled identifier for each resource
name: String
Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’. Names cannot be a UUID though they may contain a UUID.
description: String
human-readable free-form text about a resource
hostname: String
RFC1035-compliant hostname for the Instance.
memory: u64
A count of bytes, typically used either for memory or storage capacity
The maximum supported byte count is i64::MAX
. This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX). We provide all of these for consumers’ convenience.
ncpus: u16
The number of CPUs in an Instance
project_id: String
id for the project containing this Instance
run_state: InstanceState
Running state of an Instance (primarily: booted or stopped)
This typically reflects whether it’s starting, running, stopping, or stopped, but also includes states related to the Instance’s lifecycle
time_created: DisplayOptionDateTime
timestamp when this resource was created
time_modified: DisplayOptionDateTime
timestamp when this resource was last modified
time_run_state_updated: DisplayOptionDateTime
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Instance
impl<'de> Deserialize<'de> for Instance
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>,
Source§impl JsonSchema for Instance
impl JsonSchema for Instance
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more