pub struct Snapshot<'a> { /* private fields */ }
Expand description
An LXD ephemeral snapshot
Implementations
sourceimpl<'a> Snapshot<'a>
impl<'a> Snapshot<'a>
sourcepub fn publish(&self, alias: &str) -> Result<()>
pub fn publish(&self, alias: &str) -> Result<()>
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
Auto Trait Implementations
impl<'a> RefUnwindSafe for Snapshot<'a>
impl<'a> Send for Snapshot<'a>
impl<'a> Sync for Snapshot<'a>
impl<'a> Unpin for Snapshot<'a>
impl<'a> UnwindSafe for Snapshot<'a>
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