pub struct Snapshot<'a> { /* private fields */ }
Expand description

An LXD ephemeral snapshot

Implementations

Create a snapshot of a container

Arguments
  • name - name of the new snapshot
Return

A new snapshot on success

Errors

Errors that are encountered while creating snapshot will be returned

Publish snapshot as an image

Arguments
  • alias - alias of the new image
Return

An empty tuple on success

Errors

Errors that are encountered while publishing will be returned

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

let container = Container::new(Location::Local, "test-snapshot-publish", "ubuntu:16.04").unwrap();
let snapshot = Snapshot::new(&container, "test-snapshot-publish").unwrap();
snapshot.publish("test-publish").unwrap();

Trait Implementations

Executes the destructor for this type. 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 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.