pub struct DirEntry { /* private fields */ }
Expand description
DirEntry is returned by DirStream
during object list.
DirEntry carries two information: path and mode. Users can check returning dir entry’s mode or convert into an object without overhead.
Implementations
sourceimpl DirEntry
impl DirEntry
sourcepub fn into_object(self) -> Object
pub fn into_object(self) -> Object
sourcepub fn mode(&self) -> ObjectMode
pub fn mode(&self) -> ObjectMode
Return this dir entry’s object mode.
sourcepub fn id(&self) -> String
pub fn id(&self) -> String
Return this dir entry’s id.
The same with Object::id()
sourcepub fn path(&self) -> &str
pub fn path(&self) -> &str
Return this dir entry’s path.
The same with Object::path()
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Return this dir entry’s name.
The same with Object::name()
sourcepub fn etag(&self) -> Option<&str>
pub fn etag(&self) -> Option<&str>
The ETag string of DirEntry
’s corresponding object
etag
is a prefetched metadata field in DirEntry
.
It doesn’t mean this metadata field of object doesn’t exist if etag
is None
.
Then you have to call DirEntry::metadata()
to get the metadata you want.
sourcepub fn content_length(&self) -> Option<u64>
pub fn content_length(&self) -> Option<u64>
The size of DirEntry
’s corresponding object
content_length
is a prefetched metadata field in DirEntry
.
It doesn’t mean this metadata field of object doesn’t exist if content_length
is None
.
Then you have to call DirEntry::metadata()
to get the metadata you want.
sourcepub fn content_md5(&self) -> Option<&str>
pub fn content_md5(&self) -> Option<&str>
The MD5 message digest of DirEntry
’s corresponding object
content_md5
is a prefetched metadata field in DirEntry
It doesn’t mean this metadata field of object doesn’t exist if content_md5
is None
.
Then you have to call DirEntry::metadata()
to get the metadata you want.
sourcepub fn last_modified(&self) -> Option<OffsetDateTime>
pub fn last_modified(&self) -> Option<OffsetDateTime>
The last modified UTC datetime of DirEntry
’s corresponding object
last_modified
is a prefetched metadata field in DirEntry
It doesn’t mean this metadata field of object doesn’t exist if last_modified
is None
.
Then you have to call DirEntry::metadata()
to get the metadata you want.
sourcepub async fn metadata(&self) -> Result<ObjectMetadata>
pub async fn metadata(&self) -> Result<ObjectMetadata>
Fetch metadata about this dir entry.
The same with Object::metadata()
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin for DirEntry
impl !UnwindSafe for DirEntry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more