pub enum ContextMatch {
Dir,
NoExt,
Fallback,
Multi,
Ext(String),
Regex(Regex),
}Expand description
Variants§
Dir
A directory.
NoExt
A file with no extension (the name has no . after the last path
separator).
Fallback
Every path that was not claimed by a more specific rule.
Multi
A multi-row selection (more than one row selected). Not a property of a
single path, so Self::matches always returns false for it; it only
participates in ContextMenu::actions_for_selection.
Ext(String)
A file whose name ends with the extension, case-insensitively:
Ext("py") matches both x.py and x.tar.gz (multi-part suffixes are
matched from the end, so more specific rules should come first).
Regex(Regex)
The full row path matched against a regex. Applies to files and
directories alike; case-sensitive unless the pattern opts out with
(?i). Matched against the whole path, so name-only patterns should
anchor with .*\.NAME$.
Implementations§
Trait Implementations§
Source§impl Clone for ContextMatch
impl Clone for ContextMatch
Source§impl Debug for ContextMatch
impl Debug for ContextMatch
Source§impl<'de> Deserialize<'de> for ContextMatch
impl<'de> Deserialize<'de> for ContextMatch
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextMatch
Source§impl PartialEq for ContextMatch
impl PartialEq for ContextMatch
Auto Trait Implementations§
impl Freeze for ContextMatch
impl RefUnwindSafe for ContextMatch
impl Send for ContextMatch
impl Sync for ContextMatch
impl Unpin for ContextMatch
impl UnsafeUnpin for ContextMatch
impl UnwindSafe for ContextMatch
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more