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: String
config: BTreeMap<String, String>
devices: BTreeMap<String, BTreeMap<String, String>>
ephemeral: bool
profiles: Vec<String>
created_at: String
expanded_config: BTreeMap<String, String>
expanded_devices: BTreeMap<String, BTreeMap<String, String>>
name: String
stateful: bool
status: String
status_code: usize
last_used_at: String
state: Option<State>
snapshots: Option<Vec<Snapshot>>
Implementations
sourceimpl Info
impl Info
sourcepub fn new(location: Location, name: &str) -> Result<Self>
pub fn new(location: Location, name: &str) -> Result<Self>
Retrieve LXD container information from one container
Arguments
location
- The location of the hostname
- 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
sourceimpl<'de> Deserialize<'de> for Info
impl<'de> Deserialize<'de> for Info
sourcefn 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
impl Eq for Info
impl StructuralEq for Info
impl StructuralPartialEq for Info
Auto Trait Implementations
impl RefUnwindSafe for Info
impl Send for Info
impl Sync for Info
impl Unpin for Info
impl UnwindSafe for Info
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more