#[non_exhaustive]pub enum NodeRole {
Root,
Home,
Temp,
Trash,
Documents,
Downloads,
Music,
Pictures,
Videos,
Other(String),
}Expand description
Special role identifying a directory’s common purpose (draft-ietf-jmap-filenode-13 §3.1, IANA “JMAP FileNode Roles” registry §10.5).
Clients MUST ignore unrecognised role values (§3.1). Unknown values are preserved
as NodeRole::Other so they round-trip correctly.
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.
Root
Base of a filesystem; should have parentId null.
Home
User’s home directory.
Temp
Temporary space; may be cleaned up automatically.
Trash
Deleted data.
Documents
Document storage.
Downloads
Downloaded files.
Music
Audio files.
Pictures
Photos and images.
Videos
Video files.
Other(String)
Any role string not recognised by this implementation.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeRole
impl<'de> Deserialize<'de> for NodeRole
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 NodeRole
impl StructuralPartialEq for NodeRole
Auto Trait Implementations§
impl Freeze for NodeRole
impl RefUnwindSafe for NodeRole
impl Send for NodeRole
impl Sync for NodeRole
impl Unpin for NodeRole
impl UnsafeUnpin for NodeRole
impl UnwindSafe for NodeRole
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