Struct worker_plus::HttpMetadata
source · pub struct HttpMetadata {
pub content_type: Option<String>,
pub content_language: Option<String>,
pub content_disposition: Option<String>,
pub content_encoding: Option<String>,
pub cache_control: Option<String>,
pub cache_expiry: Option<Date>,
}
Expand description
Metadata that’s automatically rendered into R2 HTTP API endpoints.
* contentType -> content-type
* contentLanguage -> content-language
etc...
This data is echoed back on GET responses based on what was originally assigned to the object (and can typically also be overriden when issuing the GET request).
Fields§
§content_type: Option<String>
§content_language: Option<String>
§content_disposition: Option<String>
§content_encoding: Option<String>
§cache_control: Option<String>
§cache_expiry: Option<Date>
Trait Implementations§
source§impl Clone for HttpMetadata
impl Clone for HttpMetadata
source§fn clone(&self) -> HttpMetadata
fn clone(&self) -> HttpMetadata
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 HttpMetadata
impl Debug for HttpMetadata
source§impl Default for HttpMetadata
impl Default for HttpMetadata
source§fn default() -> HttpMetadata
fn default() -> HttpMetadata
Returns the “default value” for a type. Read more
source§impl From<HttpMetadata> for JsObject
impl From<HttpMetadata> for JsObject
source§fn from(val: HttpMetadata) -> Self
fn from(val: HttpMetadata) -> Self
Converts to this type from the input type.
source§impl From<R2HttpMetadata> for HttpMetadata
impl From<R2HttpMetadata> for HttpMetadata
source§fn from(val: R2HttpMetadataSys) -> Self
fn from(val: R2HttpMetadataSys) -> Self
Converts to this type from the input type.
source§impl PartialEq<HttpMetadata> for HttpMetadata
impl PartialEq<HttpMetadata> for HttpMetadata
source§fn eq(&self, other: &HttpMetadata) -> bool
fn eq(&self, other: &HttpMetadata) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.