pub struct UpdateAttrsRequest<'a, T: ?Sized = Bucket> {
pub key: String,
pub content_type: Option<String>,
pub cache_control: Option<String>,
pub content_disposition: Option<String>,
pub metadata: Option<BTreeMap<String, String>>,
pub version: Option<String>,
pub if_match: Option<Revision>,
/* private fields */
}Expand description
The change Bucket::update_attrs makes: set the attributes to change
with its methods, then await it. An attribute not set stays as it is, and
an empty string clears it; a cleared content type is
application/octet-stream, as S3 keeps no object without one. Returns
the object’s attributes after.
Its fields are what the request asks for, for a fake AttrsUpdater to
read.
Fields§
§key: String§content_type: Option<String>§cache_control: Option<String>§content_disposition: Option<String>§metadata: Option<BTreeMap<String, String>>§version: Option<String>§if_match: Option<Revision>Implementations§
Source§impl<'a, T: ?Sized> UpdateAttrsRequest<'a, T>
impl<'a, T: ?Sized> UpdateAttrsRequest<'a, T>
Sourcepub fn content_type(self, content_type: impl Into<String>) -> Self
pub fn content_type(self, content_type: impl Into<String>) -> Self
The object’s content type, such as application/pdf.
Sourcepub fn cache_control(self, cache_control: impl Into<String>) -> Self
pub fn cache_control(self, cache_control: impl Into<String>) -> Self
The Cache-Control the object is served with.
Sourcepub fn content_disposition(self, content_disposition: impl Into<String>) -> Self
pub fn content_disposition(self, content_disposition: impl Into<String>) -> Self
The Content-Disposition the object is served with.
Sourcepub fn metadata<K, V>(self, metadata: impl IntoIterator<Item = (K, V)>) -> Self
pub fn metadata<K, V>(self, metadata: impl IntoIterator<Item = (K, V)>) -> Self
Replaces the object’s metadata with these pairs, as many as are
given: [] clears it.
Sourcepub fn version(self, version: impl Into<String>) -> Self
pub fn version(self, version: impl Into<String>) -> Self
On this version of the object, in a versioned bucket, rather than the current one.
Sourcepub fn if_match(self, revision: Revision) -> Self
pub fn if_match(self, revision: Revision) -> Self
Only if the object is still the revision revision names: if not, it
is Error::PreconditionFailed.
Trait Implementations§
Source§impl<'a> IntoFuture for UpdateAttrsRequest<'a, Bucket>
impl<'a> IntoFuture for UpdateAttrsRequest<'a, Bucket>
Source§type Output = Result<ObjectAttrs, Error>
type Output = Result<ObjectAttrs, Error>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <UpdateAttrsRequest<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <UpdateAttrsRequest<'a> as IntoFuture>::Output> + Send + 'a>>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Source§impl<'a, T: AttrsUpdater + ?Sized> IntoFuture for UpdateAttrsRequest<'a, T>
impl<'a, T: AttrsUpdater + ?Sized> IntoFuture for UpdateAttrsRequest<'a, T>
Source§type Output = Result<ObjectAttrs, Error>
type Output = Result<ObjectAttrs, Error>
Source§type IntoFuture = Pin<Box<dyn Future<Output = <UpdateAttrsRequest<'a, T> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <UpdateAttrsRequest<'a, T> as IntoFuture>::Output> + Send + 'a>>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl<'a, T> Forget for UpdateAttrsRequest<'a, T>where
T: ?Sized,
impl<'a, T> Freeze for UpdateAttrsRequest<'a, T>
impl<'a, T> Move for UpdateAttrsRequest<'a, T>where
T: ?Sized,
impl<'a, T> RefUnwindSafe for UpdateAttrsRequest<'a, T>
impl<'a, T> Send for UpdateAttrsRequest<'a, T>
impl<'a, T> Sync for UpdateAttrsRequest<'a, T>
impl<'a, T> Unpin for UpdateAttrsRequest<'a, T>
impl<'a, T> UnsafeUnpin for UpdateAttrsRequest<'a, T>
impl<'a, T> UnwindSafe for UpdateAttrsRequest<'a, T>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request