Struct lxd::Info

source · []
pub struct Info {
Show 15 fields pub architecture: String, pub config: BTreeMap<String, String>, pub devices: BTreeMap<String, BTreeMap<String, String>>, pub ephemeral: bool, pub profiles: Vec<String>, pub created_at: String, pub expanded_config: BTreeMap<String, String>, pub expanded_devices: BTreeMap<String, BTreeMap<String, String>>, pub name: String, pub stateful: bool, pub status: String, pub status_code: usize, pub last_used_at: String, pub state: Option<State>, pub snapshots: Option<Vec<Snapshot>>,
}
Expand description

LXD container information

Fields

architecture: Stringconfig: BTreeMap<String, String>devices: BTreeMap<String, BTreeMap<String, String>>ephemeral: boolprofiles: Vec<String>created_at: Stringexpanded_config: BTreeMap<String, String>expanded_devices: BTreeMap<String, BTreeMap<String, String>>name: Stringstateful: boolstatus: Stringstatus_code: usizelast_used_at: Stringstate: Option<State>snapshots: Option<Vec<Snapshot>>

Implementations

Retrieve LXD container information from all containers

Arguments
  • location - The location of the host
Return

The LXD container information

Errors

Errors that are encountered while retrieving info will be returned

Example
use lxd::{Info, Location};

let info = Info::all(Location::Local).unwrap();

Retrieve LXD container information from one container

Arguments
  • location - The location of the host
  • name - The name of the container
Return

The LXD container information

Errors

Errors that are encountered while retrieving info will be returned

Example
use lxd::{Container, Info, Location};

let mut container = Container::new(Location::Local, "test-info", "ubuntu:16.04").unwrap();
let info = Info::new(Location::Local, "test-info").unwrap();

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.