pub struct PutBuilder<'a> { /* private fields */ }Expand description
A PUT request builder.
Implementations§
Source§impl PutBuilder<'_>
impl PutBuilder<'_>
Sourcepub fn key(self, key: impl Into<String>) -> Self
pub fn key(self, key: impl Into<String>) -> Self
Sets an explicit object key.
If a key is specified, the object will be stored under that key. Otherwise, the objectstore server will automatically assign a random key, which is then returned from this request.
Sourcepub fn compression(self, compression: impl Into<Option<Compression>>) -> Self
pub fn compression(self, compression: impl Into<Option<Compression>>) -> Self
Sets an explicit compression algorithm to be used for this payload.
None should be used if no compression should be performed by the client,
either because the payload is uncompressible (such as a media format), or if the user
will handle any kind of compression, without the clients knowledge.
Sourcepub fn expiration_policy(self, expiration_policy: ExpirationPolicy) -> Self
pub fn expiration_policy(self, expiration_policy: ExpirationPolicy) -> Self
Sets the expiration policy of the object to be uploaded.
Source§impl PutBuilder<'_>
impl PutBuilder<'_>
Sourcepub async fn send(self) -> Result<PutResponse>
pub async fn send(self) -> Result<PutResponse>
Sends the built PUT request to the upstream service.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for PutBuilder<'a>
impl<'a> !RefUnwindSafe for PutBuilder<'a>
impl<'a> Send for PutBuilder<'a>
impl<'a> !Sync for PutBuilder<'a>
impl<'a> Unpin for PutBuilder<'a>
impl<'a> !UnwindSafe for PutBuilder<'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