Struct opendal::Metadata

source ·
pub struct Metadata { /* private fields */ }
Expand description

Metadata carries all metadata associated with an path.

Notes

mode and content_length are required metadata that all services should provide during stat operation. But in list operation, a.k.a., Entry’s content length could be None.

Implementations§

Create a new metadata

mode represent this entry’s mode.

Returns true if this metadata is for a file.

Returns true if this metadata is for a directory.

Set mode for entry.

Set mode for entry.

Content length of this entry.

Content-Length is defined by RFC 7230 Refer to MDN Content-Length for more information.

Set content length of this entry.

Set content length of this entry.

Content MD5 of this entry.

Content MD5 is defined by RFC 2616. And removed by RFC 7231.

OpenDAL will try its best to set this value, but not guarantee this value is the md5 of content.

Set content MD5 of this entry.

Content MD5 is defined by RFC 2616. And removed by RFC 7231.

Set content MD5 of this entry.

Content MD5 is defined by RFC 2616. And removed by RFC 7231.

Content Type of this entry.

Content Type is defined by RFC 9110.

Set Content Type of this entry.

Content Type is defined by RFC 9110.

Set Content Type of this entry.

Content Type is defined by RFC 9110.

Content Range of this entry.

Content Range is defined by RFC 9110.

Set Content Range of this entry.

Content Range is defined by RFC 9110.

Set Content Range of this entry.

Content Range is defined by RFC 9110.

Last modified of this entry.

Last-Modified is defined by RFC 7232 Refer to MDN Last-Modified for more information.

OpenDAL parse the raw value into [OffsetDateTime] for convenient.

Set Last modified of this entry.

Last-Modified is defined by RFC 7232 Refer to MDN Last-Modified for more information.

Set Last modified of this entry.

Last-Modified is defined by RFC 7232 Refer to MDN Last-Modified for more information.

ETag of this entry.

ETag is defined by RFC 7232 Refer to MDN ETag for more information.

OpenDAL will return this value AS-IS like the following:

  • "33a64df551425fcc55e4d42a148795d9f25f89d4"
  • W/"0815"

" is part of etag.

Set ETag of this entry.

ETag is defined by RFC 7232 Refer to MDN ETag for more information.

OpenDAL will return this value AS-IS like the following:

  • "33a64df551425fcc55e4d42a148795d9f25f89d4"
  • W/"0815"

" is part of etag, don’t trim it before setting.

Set ETag of this entry.

ETag is defined by RFC 7232 Refer to MDN ETag for more information.

OpenDAL will return this value AS-IS like the following:

  • "33a64df551425fcc55e4d42a148795d9f25f89d4"
  • W/"0815"

" is part of etag, don’t trim it before setting.

Content-Disposition of this entry

Content-Disposition is defined by RFC 2616 and clarified usage in RFC 6266. Refer to MDN Content-Disposition for more information.

OpenDAL will return this value AS-IS like the following:

  • “inline”
  • “attachment”
  • “attachment; filename="filename.jpg"”

Set Content-Disposition of this entry

Content-Disposition is defined by RFC 2616 and clarified usage in RFC 6266. Refer to MDN Content-Disposition for more information.

OpenDAL will return this value AS-IS like the following:

  • “inline”
  • “attachment”
  • “attachment; filename="filename.jpg"”

Set Content-Disposition of this entry

Content-Disposition is defined by RFC 2616 and clarified usage in RFC 6266. Refer to MDN Content-Disposition for more information.

OpenDAL will return this value AS-IS like the following:

  • “inline”
  • “attachment”
  • “attachment; filename="filename.jpg"”

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Applies the [Compat] adapter by value. Read more
Applies the [Compat] adapter by shared reference. Read more
Applies the [Compat] adapter by mutable reference. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more