[][src]Struct cloud_storage_sync::Sync

pub struct Sync { /* fields omitted */ }

Methods

impl Sync[src]

pub fn new(force_overwrite: bool) -> Self[src]

Creates new Sync instance

Arguments:

  • force_overwrite: Don't do size and checksum comparison, just overwrite everthing

pub fn sync_gcs_to_local(
    &self,
    bucket_src: &str,
    path_src: &str,
    path_dst: impl AsRef<Path>
) -> Result<(), Error>
[src]

Syncs remote GCS bucket path to a local path

pub fn sync_local_to_gcs(
    &self,
    path_src: impl AsRef<Path>,
    bucket_dst: &str,
    path_dst: &str
) -> Result<(), Error>
[src]

Syncs local file or directory to GCS bucket if path_src is a file then the resulting object will be [bucket_dst]/[path_dst]/[filename] where [filename] is a string after the last "/" of the path_src

pub fn copy_gcs_to_gcs(
    bucket_src: &str,
    path_src: &str,
    bucket_dst: &str,
    path_dst: &str
) -> Result<(), Error>
[src]

Copies remote GCS bucket file or directory to another remote GCS bucket file or directory

pub fn sync_local_dir_to_gcs(
    &self,
    path_src: impl AsRef<Path>,
    bucket: &str,
    path_dst: &str
) -> Result<(), Error>
[src]

Syncs local directory to gcs bucket the resulting filenames will be [path_dst]/[filename] where [filename] is path relative to the path_src

pub fn sync_local_file_to_gcs(
    &self,
    path_src: impl AsRef<Path>,
    bucket: &str,
    filename: &str
) -> Result<(), Error>
[src]

Syncs local file and remote object

Trait Implementations

impl Debug for Sync[src]

Auto Trait Implementations

impl RefUnwindSafe for Sync

impl Send for Sync

impl Sync for Sync

impl Unpin for Sync

impl UnwindSafe for Sync

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.