pub enum FileOrFolderKey {
File(FileKey),
Folder(FolderKey),
}
Expand description
Either a file or folder key
Variants§
Implementations§
Source§impl FileOrFolderKey
impl FileOrFolderKey
Sourcepub fn as_file_key(&self) -> Option<&FileKey>
pub fn as_file_key(&self) -> Option<&FileKey>
Get a ref to the file key, if it is one.
Sourcepub fn as_folder_key(&self) -> Option<&FolderKey>
pub fn as_folder_key(&self) -> Option<&FolderKey>
Get a ref to the folder key, if it is one.
Sourcepub fn take_file_key(self) -> Option<FileKey>
pub fn take_file_key(self) -> Option<FileKey>
Take the file key, if it is one.
Sourcepub fn take_folder_key(self) -> Option<FolderKey>
pub fn take_folder_key(self) -> Option<FolderKey>
Take the folder key, if it is one.
Sourcepub fn is_file_key(&self) -> bool
pub fn is_file_key(&self) -> bool
Check if this is a file key.
Sourcepub fn is_folder_key(&self) -> bool
pub fn is_folder_key(&self) -> bool
Check if this is a folder key.
Trait Implementations§
Source§impl Clone for FileOrFolderKey
impl Clone for FileOrFolderKey
Source§fn clone(&self) -> FileOrFolderKey
fn clone(&self) -> FileOrFolderKey
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 FileOrFolderKey
impl Debug for FileOrFolderKey
Source§impl<'de> Deserialize<'de> for FileOrFolderKey
impl<'de> Deserialize<'de> for FileOrFolderKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Display for FileOrFolderKey
impl Display for FileOrFolderKey
Source§impl From<FileKey> for FileOrFolderKey
impl From<FileKey> for FileOrFolderKey
Source§impl From<FileOrFolderKey> for String
impl From<FileOrFolderKey> for String
Source§fn from(key: FileOrFolderKey) -> Self
fn from(key: FileOrFolderKey) -> Self
Converts to this type from the input type.
Source§impl From<FolderKey> for FileOrFolderKey
impl From<FolderKey> for FileOrFolderKey
Source§impl FromStr for FileOrFolderKey
impl FromStr for FileOrFolderKey
Source§impl Serialize for FileOrFolderKey
impl Serialize for FileOrFolderKey
Auto Trait Implementations§
impl Freeze for FileOrFolderKey
impl RefUnwindSafe for FileOrFolderKey
impl Send for FileOrFolderKey
impl Sync for FileOrFolderKey
impl Unpin for FileOrFolderKey
impl UnwindSafe for FileOrFolderKey
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