#[non_exhaustive]pub enum NodeType {
File,
Directory,
Symlink,
Other(String),
}Expand description
The type of a FileNode (draft-ietf-jmap-filenode-13 §3.1, IANA “JMAP FileNode Types” registry §10.4).
Values are registered strings. Any unrecognised value is preserved as
NodeType::Other so clients do not lose data when the registry gains new entries.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
File
Regular file; blobId MUST be non-null.
Directory
Collection that may contain child nodes; blobId MUST be null.
Symlink
Symbolic link; target MUST be non-null and blobId MUST be null.
Other(String)
Any node type string not recognised by this implementation.
The inner string retains the original wire value for round-trip fidelity.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeType
impl<'de> Deserialize<'de> for NodeType
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NodeType
impl StructuralPartialEq for NodeType
Auto Trait Implementations§
impl Freeze for NodeType
impl RefUnwindSafe for NodeType
impl Send for NodeType
impl Sync for NodeType
impl Unpin for NodeType
impl UnsafeUnpin for NodeType
impl UnwindSafe for NodeType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more