pub struct R2Path<'a> { /* private fields */ }Expand description
A Cloudflare R2 path.
Implementations§
Source§impl<'a> R2Path<'a>
Read
impl<'a> R2Path<'a>
Read
Source§impl<'a> R2Path<'a>
Write
impl<'a> R2Path<'a>
Write
Source§impl<'a> R2Path<'a>
Write: Headers
impl<'a> R2Path<'a>
Write: Headers
Sourcepub fn write_with_headers<D>(
self,
data: D,
headers: &Headers,
) -> Result<(), Error>
pub fn write_with_headers<D>( self, data: D, headers: &Headers, ) -> Result<(), Error>
See FilePath::write_with_headers.
Sourcepub async fn write_with_headers_async(
self,
data: &[u8],
headers: &Headers,
) -> Result<(), Error>
pub async fn write_with_headers_async( self, data: &[u8], headers: &Headers, ) -> Result<(), Error>
See FilePath::write_with_headers.
Source§impl<'a> R2Path<'a>
Delete Files
impl<'a> R2Path<'a>
Delete Files
Sourcepub fn delete_files(self) -> Result<(), Error>
pub fn delete_files(self) -> Result<(), Error>
Deletes all files with the current key prefix.
Sourcepub async fn delete_files_async(self) -> Result<(), Error>
pub async fn delete_files_async(self) -> Result<(), Error>
Deletes all files with the current key prefix.
Source§impl<'a> R2Path<'a>
List Files
impl<'a> R2Path<'a>
List Files
Sourcepub fn list_files(self) -> Result<R2ListFilesOp, Error>
pub fn list_files(self) -> Result<R2ListFilesOp, Error>
Lists the files in the folder.
Sourcepub async fn list_files_async(self) -> Result<R2ListFilesOp, Error>
pub async fn list_files_async(self) -> Result<R2ListFilesOp, Error>
Lists the files in the folder.
Trait Implementations§
impl<'a> Copy for R2Path<'a>
impl<'a> Eq for R2Path<'a>
Source§impl<'a> Ord for R2Path<'a>
impl<'a> Ord for R2Path<'a>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<'a> PartialOrd for R2Path<'a>
impl<'a> PartialOrd for R2Path<'a>
impl<'a> StructuralPartialEq for R2Path<'a>
Auto Trait Implementations§
impl<'a> Freeze for R2Path<'a>
impl<'a> RefUnwindSafe for R2Path<'a>
impl<'a> Send for R2Path<'a>
impl<'a> Sync for R2Path<'a>
impl<'a> Unpin for R2Path<'a>
impl<'a> UnsafeUnpin for R2Path<'a>
impl<'a> UnwindSafe for R2Path<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.