Struct coldsnap::SnapshotUploader
source · pub struct SnapshotUploader { /* private fields */ }
Implementations§
source§impl SnapshotUploader
impl SnapshotUploader
pub fn new(ebs_client: EbsClient) -> Self
sourcepub async fn upload_from_file<P: AsRef<Path>>(
&self,
path: P,
volume_size: Option<i64>,
description: Option<&str>,
progress_bar: Option<ProgressBar>
) -> Result<String, Error>
pub async fn upload_from_file<P: AsRef<Path>>( &self, path: P, volume_size: Option<i64>, description: Option<&str>, progress_bar: Option<ProgressBar> ) -> Result<String, Error>
Upload a snapshot from the file at the specified path.
path
is the source file for the snapshot.volume_size
is the desired size in GiB. If no size is provided (None
), the source file’s size will be rounded up to the nearest GiB and used instead.description
is the snapshot description. If no description is provided (None
), the source file’s name will be used instead.progress_bar
is optional, since output to the terminal may not be wanted.
Auto Trait Implementations§
impl Freeze for SnapshotUploader
impl !RefUnwindSafe for SnapshotUploader
impl Send for SnapshotUploader
impl Sync for SnapshotUploader
impl Unpin for SnapshotUploader
impl !UnwindSafe for SnapshotUploader
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Creates a shared type from an unshared type.