Skip to main content

FileNodeCapability

Struct FileNodeCapability 

Source
#[non_exhaustive]
pub struct FileNodeCapability { pub max_file_node_depth: Option<u64>, pub max_size_file_node_name: u64, pub forbidden_name_chars: Option<String>, pub forbidden_node_names: Option<Vec<String>>, pub file_node_query_sort_options: Vec<String>, pub may_create_top_level_file_node: bool, pub web_trash_url: Option<String>, pub case_insensitive_names: bool, pub web_url_template: Option<String>, pub web_write_url_template: Option<String>, }
Expand description

Account-level capability for the JMAP FileNode extension (draft-ietf-jmap-filenode-13 §2.1).

The value of the urn:ietf:params:jmap:filenode key in accountCapabilities.

§Nullable fields

Fields typed Option<T> with no skip_serializing_if are required-and-nullable: they MUST appear in wire JSON even when the value is null (e.g. "maxFileNodeDepth":null means no limit). Fields with skip_serializing_if = "Option::is_none" are absent when None, but none exist on this struct — all optional fields here are nullable.

§maxSizeFileNodeName constraint

Per §2.1 the server MUST set this to at least 100. This crate does not enforce the constraint at the type level (that would require a newtype); the server implementation is responsible for the invariant.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§max_file_node_depth: Option<u64>

Maximum depth of the FileNode hierarchy (one more than the max ancestor count), or null for no limit.

Always serialized (as null when None).

§max_size_file_node_name: u64

Maximum length, in UTF-8 octets, for a FileNode name. MUST be ≥ 100.

§forbidden_name_chars: Option<String>

Characters forbidden in FileNode names, each character individually forbidden. null means the server imposes no character restrictions beyond Net-Unicode.

Always serialized (as null when None).

§forbidden_node_names: Option<Vec<String>>

Complete names the server will not accept (compared case-insensitively). null means no specific names are forbidden.

Always serialized (as null when None).

§file_node_query_sort_options: Vec<String>

All sort property values supported for the "property" field of a Comparator object in FileNode/query.

§may_create_top_level_file_node: bool

If true, the user may create a FileNode with a null parentId in this account.

§web_trash_url: Option<String>

Web URL for the folder with the "trash" role, or null if unavailable.

Always serialized (as null when None).

§case_insensitive_names: bool

If true, the server treats file names as case-insensitive for all name collision checks (including the sibling uniqueness constraint and onExists handling). The server preserves the original case as provided by the client.

§web_url_template: Option<String>

URI Template (level 1) for viewing a node on the web, with {id} variable. null if no web URL is available.

Always serialized (as null when None).

§web_write_url_template: Option<String>

URI Template (level 1) for direct HTTP writes to a file node, with {id} variable. null if direct HTTP writes are not supported.

Always serialized (as null when None).

Trait Implementations§

Source§

impl Clone for FileNodeCapability

Source§

fn clone(&self) -> FileNodeCapability

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FileNodeCapability

Source§

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

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

impl<'de> Deserialize<'de> for FileNodeCapability

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for FileNodeCapability

Source§

fn eq(&self, other: &FileNodeCapability) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Serialize for FileNodeCapability

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FileNodeCapability

Auto Trait Implementations§

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.