Struct Object

Source
pub struct Object<'b> {
    pub bucket_key: Present<BucketKey<'b>>,
    pub size: i64,
    pub e_tag: String,
    pub last_modified: LastModified,
}
Expand description

Represents an existing object and its metadata in S3.

Fields§

§bucket_key: Present<BucketKey<'b>>§size: i64§e_tag: String§last_modified: LastModified

Implementations§

Source§

impl<'b> Object<'b>

Source

pub fn bucket_key(&self) -> &Present<BucketKey<'b>>

Gets BucketKey pointing to this object.

Source

pub fn unwrap_bucket_key(self) -> Present<BucketKey<'b>>

Unwraps inner BucketKey pointing to this object.

Source

pub fn size(&self) -> i64

Gets object size.

Source

pub fn e_tag(&self) -> &str

Gets object ETag.

Source

pub fn last_modified(&self) -> &LastModified

Gets object last modified time.

Trait Implementations§

Source§

impl<'b> Borrow<Present<BucketKey<'b>>> for Object<'b>

Source§

fn borrow(&self) -> &Present<BucketKey<'b>>

Immutably borrows from an owned value. Read more
Source§

impl<'b> Debug for Object<'b>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'b> From<Object<'b>> for BucketKey<'b>

Source§

fn from(obj: Object<'b>) -> BucketKey<'b>

Converts to this type from the input type.
Source§

impl<'b> From<Object<'b>> for Present<BucketKey<'b>>

Source§

fn from(obj: Object<'b>) -> Present<BucketKey<'b>>

Converts to this type from the input type.
Source§

impl<'b> PartialEq for Object<'b>

Source§

fn eq(&self, other: &Object<'b>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'b> PresentBucketKeyName for Object<'b>

Source§

fn bucket_name(&self) -> &str

Gets bucket name.
Source§

fn key(&self) -> &str

Gets key.
Source§

impl<'b> Eq for Object<'b>

Source§

impl<'b> StructuralPartialEq for Object<'b>

Auto Trait Implementations§

§

impl<'b> Freeze for Object<'b>

§

impl<'b> RefUnwindSafe for Object<'b>

§

impl<'b> Send for Object<'b>

§

impl<'b> Sync for Object<'b>

§

impl<'b> Unpin for Object<'b>

§

impl<'b> UnwindSafe for Object<'b>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<'i, T> Captures1<'i> for T

Source§

impl<'i, T> Captures2<'i> for T