pub struct PutOptions {
pub visibility: Visibility,
pub content_type: Option<String>,
pub metadata: Option<HashMap<String, String>>,
}Expand description
Options for storing files.
Fields§
§visibility: VisibilityFile visibility.
content_type: Option<String>Content type override.
metadata: Option<HashMap<String, String>>Custom metadata.
Implementations§
Source§impl PutOptions
impl PutOptions
Sourcepub fn new() -> PutOptions
pub fn new() -> PutOptions
Create new put options.
Sourcepub fn visibility(self, visibility: Visibility) -> PutOptions
pub fn visibility(self, visibility: Visibility) -> PutOptions
Set visibility.
Sourcepub fn content_type(self, content_type: impl Into<String>) -> PutOptions
pub fn content_type(self, content_type: impl Into<String>) -> PutOptions
Set content type.
Sourcepub fn public(self) -> PutOptions
pub fn public(self) -> PutOptions
Make file public.
Sourcepub fn private(self) -> PutOptions
pub fn private(self) -> PutOptions
Make file private.
Trait Implementations§
Source§impl Clone for PutOptions
impl Clone for PutOptions
Source§fn clone(&self) -> PutOptions
fn clone(&self) -> PutOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PutOptions
impl Debug for PutOptions
Source§impl Default for PutOptions
impl Default for PutOptions
Source§fn default() -> PutOptions
fn default() -> PutOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PutOptions
impl RefUnwindSafe for PutOptions
impl Send for PutOptions
impl Sync for PutOptions
impl Unpin for PutOptions
impl UnsafeUnpin for PutOptions
impl UnwindSafe for PutOptions
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<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 more