[−][src]Struct cloud_storage_sync::Sync
Implementations
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 async fn sync_gcs_to_local(
&self,
bucket_src: &str,
path_src: &str,
path_dst: impl AsRef<Path>
) -> Result<usize, Error>[src]
&self,
bucket_src: &str,
path_src: &str,
path_dst: impl AsRef<Path>
) -> Result<usize, Error>
Syncs remote GCS bucket path to a local path
Returns actual downloads count
pub async fn sync_local_to_gcs(
&self,
path_src: impl AsRef<Path>,
bucket_dst: &str,
path_dst: &str
) -> Result<usize, Error>[src]
&self,
path_src: impl AsRef<Path>,
bucket_dst: &str,
path_dst: &str
) -> Result<usize, Error>
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 async fn copy_gcs_to_gcs(
bucket_src: &str,
path_src: &str,
bucket_dst: &str,
path_dst: &str
) -> Result<usize, Error>[src]
bucket_src: &str,
path_src: &str,
bucket_dst: &str,
path_dst: &str
) -> Result<usize, Error>
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: String,
bucket: String,
path_dst: String
) -> BoxFuture<'_, Result<usize, Error>>[src]
&self,
path_src: String,
bucket: String,
path_dst: String
) -> BoxFuture<'_, Result<usize, Error>>
Syncs local directory to gcs bucket the resulting filenames will be [path_dst]/[filename] where [filename] is path relative to the path_src
pub async fn sync_local_file_to_gcs(
&self,
path_src: impl AsRef<Path>,
bucket: &str,
filename: &str
) -> Result<usize, Error>[src]
&self,
path_src: impl AsRef<Path>,
bucket: &str,
filename: &str
) -> Result<usize, Error>
Syncs local file and remote object
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sync[src]
impl Send for Sync[src]
impl Sync for Sync[src]
impl Unpin for Sync[src]
impl UnwindSafe for Sync[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,