Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ mod tests {
#[test]
fn assert_size() {
assert_eq!(16, size_of::<Operator>());
assert_eq!(320, size_of::<Entry>());
assert_eq!(296, size_of::<Metadata>());
assert_eq!(344, size_of::<Entry>());
assert_eq!(320, size_of::<Metadata>());
assert_eq!(1, size_of::<EntryMode>());
assert_eq!(24, size_of::<Scheme>());
}
Expand Down
2 changes: 2 additions & 0 deletions core/src/types/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ pub struct Capability {
pub write_with_content_disposition: bool,
/// Indicates if Content-Encoding can be specified during write operations.
pub write_with_content_encoding: bool,
/// Indicates if Content-Language can be specified during write operations.
pub write_with_content_language: bool,
/// Indicates if Cache-Control can be specified during write operations.
pub write_with_cache_control: bool,
/// Indicates if conditional write operations using If-Match are supported.
Expand Down
17 changes: 17 additions & 0 deletions core/src/types/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub struct Metadata {
content_range: Option<BytesContentRange>,
content_type: Option<String>,
content_encoding: Option<String>,
content_language: Option<String>,
etag: Option<String>,
last_modified: Option<DateTime<Utc>>,
version: Option<String>,
Expand All @@ -82,6 +83,7 @@ impl Metadata {
content_md5: None,
content_type: None,
content_encoding: None,
content_language: None,
content_range: None,
last_modified: None,
etag: None,
Expand Down Expand Up @@ -295,6 +297,21 @@ impl Metadata {
self
}

/// Content Language of this entry.
///
/// Content Language is defined by [RFC 7231](https://httpwg.org/specs/rfc7231.html#header.content-language)
///
/// Refer to [MDN Content-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Language) for more information.
pub fn content_language(&self) -> Option<&str> {
self.content_language.as_deref()
}

/// Set Content Language of this entry.
pub fn set_content_language(&mut self, v: &str) -> &mut Self {
self.content_language = Some(v.to_string());
self
}

/// Content Range of this entry.
///
/// Content Range is defined by [RFC 9110](https://httpwg.org/specs/rfc9110.html#field.content-range).
Expand Down
1 change: 1 addition & 0 deletions core/src/types/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ pub struct WriteOptions {
///
/// This operation allows specifying the encoding applied to the content being written.
pub content_encoding: Option<String>,

/// Sets user metadata for this write request.
///
/// ### Capability
Expand Down
Loading