pub struct Attributes(/* private fields */);Expand description
Additional attributes of an object
Attributes can be specified in PutOptions and retrieved from APIs returning GetResult.
Unlike ObjectMeta, Attributes are not returned by
listing APIs
Implementations§
Source§impl Attributes
impl Attributes
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new empty Attributes
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new Attributes with space for capacity Attribute
Sourcepub fn insert(
&mut self,
key: Attribute,
value: AttributeValue,
) -> Option<AttributeValue>
pub fn insert( &mut self, key: Attribute, value: AttributeValue, ) -> Option<AttributeValue>
Insert a new Attribute, AttributeValue pair
Returns the previous value for key if any
Sourcepub fn get(&self, key: &Attribute) -> Option<&AttributeValue>
pub fn get(&self, key: &Attribute) -> Option<&AttributeValue>
Returns the AttributeValue for key if any
Sourcepub fn remove(&mut self, key: &Attribute) -> Option<AttributeValue>
pub fn remove(&mut self, key: &Attribute) -> Option<AttributeValue>
Removes the AttributeValue for key if any
Sourcepub fn iter(&self) -> AttributesIter<'_> ⓘ
pub fn iter(&self) -> AttributesIter<'_> ⓘ
Returns an AttributesIter over this
Trait Implementations§
Source§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a copy 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 Attributes
impl Debug for Attributes
Source§impl Default for Attributes
impl Default for Attributes
Source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
Source§impl From<Attributes> for PutMultipartOpts
impl From<Attributes> for PutMultipartOpts
Source§fn from(attributes: Attributes) -> Self
fn from(attributes: Attributes) -> Self
Converts to this type from the input type.
Source§impl From<Attributes> for PutOptions
impl From<Attributes> for PutOptions
Source§fn from(attributes: Attributes) -> Self
fn from(attributes: Attributes) -> Self
Converts to this type from the input type.
Source§impl<K, V> FromIterator<(K, V)> for Attributes
impl<K, V> FromIterator<(K, V)> for Attributes
Source§impl<'a> IntoIterator for &'a Attributes
impl<'a> IntoIterator for &'a Attributes
Source§impl PartialEq for Attributes
impl PartialEq for Attributes
impl Eq for Attributes
impl StructuralPartialEq for Attributes
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
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> 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<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