Struct object_store::Attributes
source · 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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