pub enum ArcCow<'a, T>where
T: ?Sized,{
Borrowed(&'a T),
Owned(Arc<T, Global>),
}
Variants§
Trait Implementations§
§impl<'a, T> PartialEq<ArcCow<'a, T>> for ArcCow<'a, T>where
T: PartialEq<T> + ?Sized,
impl<'a, T> PartialEq<ArcCow<'a, T>> for ArcCow<'a, T>where T: PartialEq<T> + ?Sized,
impl<'a, T> Eq for ArcCow<'a, T>where T: Eq + ?Sized,
Auto Trait Implementations§
impl<'a, T: ?Sized> RefUnwindSafe for ArcCow<'a, T>where T: RefUnwindSafe,
impl<'a, T: ?Sized> Send for ArcCow<'a, T>where T: Send + Sync,
impl<'a, T: ?Sized> Sync for ArcCow<'a, T>where T: Send + Sync,
impl<'a, T: ?Sized> Unpin for ArcCow<'a, T>
impl<'a, T: ?Sized> UnwindSafe for ArcCow<'a, T>where T: RefUnwindSafe,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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> 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>
§impl<T> PathExt for Twhere
T: AsRef<Path>,
impl<T> PathExt for Twhere T: AsRef<Path>,
§fn compact(&self) -> PathBuf
fn compact(&self) -> PathBuf
Compacts a given file path by replacing the user’s home directory
prefix with a tilde (~
).
Returns
- A
PathBuf
containing the compacted file path. If the input path does not have the user’s home directory prefix, or if we are not on Linux or macOS, the original path is returned unchanged.
§fn icon_suffix(&self) -> Option<&str>
fn icon_suffix(&self) -> Option<&str>
Returns a suffix of the path that is used to determine which file icon to use
Returns a file’s extension or, if the file is hidden, its name without the leading dot