pub struct FileOrFolderNamed(/* private fields */);Expand description
Defines a file or a folder with various name types. It is required that there exists exactly one file or folder with a given name description.
Implementations§
Source§impl FileOrFolderNamed
impl FileOrFolderNamed
pub fn exact(name: impl Into<String>) -> Self
pub fn any(names: Vec<impl Into<String>>) -> Self
pub fn any_named(names: Vec<FileOrFolderNamed>) -> Self
pub fn regex(pattern: impl Into<String>) -> Self
pub fn wildmatch(pattern: impl Into<String>) -> Self
pub fn within(&self, directory: impl Into<PathBuf>) -> OneEntry
pub fn alias(&self, name: impl Into<String>) -> EntityAlias
Trait Implementations§
Source§impl Clone for FileOrFolderNamed
impl Clone for FileOrFolderNamed
Source§fn clone(&self) -> FileOrFolderNamed
fn clone(&self) -> FileOrFolderNamed
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FileOrFolderNamed
impl Debug for FileOrFolderNamed
Source§impl<'de> Deserialize<'de> for FileOrFolderNamed
impl<'de> Deserialize<'de> for FileOrFolderNamed
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 OneEntryNamed for FileOrFolderNamed
impl OneEntryNamed for FileOrFolderNamed
fn within_path_buf(&self, directory: PathBuf) -> OneEntry
fn entry_name(&self) -> &EntryName
fn entry_type(&self) -> &EntryType
fn name_alias(&self) -> Option<&str>
fn boxed(&self) -> Box<dyn OneEntryNamed>
Auto Trait Implementations§
impl Freeze for FileOrFolderNamed
impl RefUnwindSafe for FileOrFolderNamed
impl Send for FileOrFolderNamed
impl Sync for FileOrFolderNamed
impl Unpin for FileOrFolderNamed
impl UnsafeUnpin for FileOrFolderNamed
impl UnwindSafe for FileOrFolderNamed
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