pub struct SledInstance {
pub active_sled_id: Uuid,
pub id: Uuid,
pub memory: i64,
pub migration_id: Option<Uuid>,
pub name: Name,
pub ncpus: i64,
pub project_name: Name,
pub silo_name: Name,
pub state: InstanceState,
pub time_created: DateTime<Utc>,
pub time_modified: DateTime<Utc>,
}Expand description
An operator’s view of an instance running on a given sled
JSON schema
{
"description": "An operator's view of an instance running on a given
sled",
"type": "object",
"required": [
"active_sled_id",
"id",
"memory",
"name",
"ncpus",
"project_name",
"silo_name",
"state",
"time_created",
"time_modified"
],
"properties": {
"active_sled_id": {
"type": "string",
"format": "uuid"
},
"id": {
"description": "unique, immutable, system-controlled identifier for
each resource",
"type": "string",
"format": "uuid"
},
"memory": {
"type": "integer",
"format": "int64"
},
"migration_id": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"name": {
"$ref": "#/components/schemas/Name"
},
"ncpus": {
"type": "integer",
"format": "int64"
},
"project_name": {
"$ref": "#/components/schemas/Name"
},
"silo_name": {
"$ref": "#/components/schemas/Name"
},
"state": {
"$ref": "#/components/schemas/InstanceState"
},
"time_created": {
"description": "timestamp when this resource was created",
"type": "string",
"format": "date-time"
},
"time_modified": {
"description": "timestamp when this resource was last modified",
"type": "string",
"format": "date-time"
}
}
}Fields§
§active_sled_id: Uuid§id: Uuidunique, immutable, system-controlled identifier for each resource
memory: i64§migration_id: Option<Uuid>§name: Name§ncpus: i64§project_name: Name§silo_name: Name§state: InstanceState§time_created: DateTime<Utc>timestamp when this resource was created
time_modified: DateTime<Utc>timestamp when this resource was last modified
Implementations§
Source§impl SledInstance
impl SledInstance
pub fn builder() -> SledInstance
Trait Implementations§
Source§impl Clone for SledInstance
impl Clone for SledInstance
Source§fn clone(&self) -> SledInstance
fn clone(&self) -> SledInstance
Returns a duplicate of the value. Read more
1.0.0 · 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 SledInstance
impl Debug for SledInstance
Source§impl<'de> Deserialize<'de> for SledInstance
impl<'de> Deserialize<'de> for SledInstance
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<&SledInstance> for SledInstance
impl From<&SledInstance> for SledInstance
Source§fn from(value: &SledInstance) -> Self
fn from(value: &SledInstance) -> Self
Converts to this type from the input type.
Source§impl From<SledInstance> for SledInstance
impl From<SledInstance> for SledInstance
Source§fn from(value: SledInstance) -> Self
fn from(value: SledInstance) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for SledInstance
impl JsonSchema for SledInstance
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for SledInstance
impl Serialize for SledInstance
Source§impl TryFrom<SledInstance> for SledInstance
impl TryFrom<SledInstance> for SledInstance
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: SledInstance) -> Result<Self, ConversionError>
fn try_from(value: SledInstance) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SledInstance
impl RefUnwindSafe for SledInstance
impl Send for SledInstance
impl Sync for SledInstance
impl Unpin for SledInstance
impl UnwindSafe for SledInstance
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