pub struct SystemVirtualPathBuf(/* private fields */);Implementations§
Source§impl SystemVirtualPathBuf
impl SystemVirtualPathBuf
pub const fn as_path(&self) -> &SystemVirtualPath
Methods from Deref<Target = SystemVirtualPath>§
Sourcepub fn to_path_buf(&self) -> SystemVirtualPathBuf
pub fn to_path_buf(&self) -> SystemVirtualPathBuf
Converts the path to an owned SystemVirtualPathBuf.
Sourcepub fn extension(&self) -> Option<&str>
pub fn extension(&self) -> Option<&str>
Extracts the file extension, if possible.
§Examples
use ruff_db::system::SystemVirtualPath;
assert_eq!(None, SystemVirtualPath::new("untitled:Untitled-1").extension());
assert_eq!("ipynb", SystemVirtualPath::new("untitled:Untitled-1.ipynb").extension().unwrap());
assert_eq!("ipynb", SystemVirtualPath::new("vscode-notebook-cell:Untitled-1.ipynb").extension().unwrap());See Path::extension for more details.
Trait Implementations§
Source§impl AsRef<SystemVirtualPath> for SystemVirtualPathBuf
impl AsRef<SystemVirtualPath> for SystemVirtualPathBuf
Source§fn as_ref(&self) -> &SystemVirtualPath
fn as_ref(&self) -> &SystemVirtualPath
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<SystemVirtualPath> for SystemVirtualPathBuf
impl Borrow<SystemVirtualPath> for SystemVirtualPathBuf
Source§fn borrow(&self) -> &SystemVirtualPath
fn borrow(&self) -> &SystemVirtualPath
Immutably borrows from an owned value. Read more
Source§impl Clone for SystemVirtualPathBuf
impl Clone for SystemVirtualPathBuf
Source§fn clone(&self) -> SystemVirtualPathBuf
fn clone(&self) -> SystemVirtualPathBuf
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 SystemVirtualPathBuf
impl Debug for SystemVirtualPathBuf
Source§impl Deref for SystemVirtualPathBuf
impl Deref for SystemVirtualPathBuf
Source§impl Display for SystemVirtualPathBuf
impl Display for SystemVirtualPathBuf
impl Eq for SystemVirtualPathBuf
Source§impl From<String> for SystemVirtualPathBuf
impl From<String> for SystemVirtualPathBuf
Source§impl From<SystemVirtualPathBuf> for FilePath
impl From<SystemVirtualPathBuf> for FilePath
Source§fn from(value: SystemVirtualPathBuf) -> Self
fn from(value: SystemVirtualPathBuf) -> Self
Converts to this type from the input type.
Source§impl From<SystemVirtualPathBuf> for Box<SystemVirtualPath>
impl From<SystemVirtualPathBuf> for Box<SystemVirtualPath>
Source§fn from(path: SystemVirtualPathBuf) -> Self
fn from(path: SystemVirtualPathBuf) -> Self
Converts to this type from the input type.
Source§impl GetSize for SystemVirtualPathBuf
impl GetSize for SystemVirtualPathBuf
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
Determines how many bytes this object occupies inside the heap while using a
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
Determines the total size of the object while using a
tracker. Read moreSource§impl Hash for SystemVirtualPathBuf
impl Hash for SystemVirtualPathBuf
Source§impl Ord for SystemVirtualPathBuf
impl Ord for SystemVirtualPathBuf
Source§fn cmp(&self, other: &SystemVirtualPathBuf) -> Ordering
fn cmp(&self, other: &SystemVirtualPathBuf) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SystemVirtualPathBuf
impl PartialEq for SystemVirtualPathBuf
Source§impl PartialOrd for SystemVirtualPathBuf
impl PartialOrd for SystemVirtualPathBuf
impl StructuralPartialEq for SystemVirtualPathBuf
Auto Trait Implementations§
impl Freeze for SystemVirtualPathBuf
impl RefUnwindSafe for SystemVirtualPathBuf
impl Send for SystemVirtualPathBuf
impl Sync for SystemVirtualPathBuf
impl Unpin for SystemVirtualPathBuf
impl UnsafeUnpin for SystemVirtualPathBuf
impl UnwindSafe for SystemVirtualPathBuf
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> HashEqLike<&T> for T
impl<T> HashEqLike<&T> for T
Source§impl<T> HashEqLike<Cow<'_, T>> for T
impl<T> HashEqLike<Cow<'_, T>> for T
Source§impl<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
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> IntoDiagnosticMessage for Twhere
T: Display,
impl<T> IntoDiagnosticMessage for Twhere
T: Display,
fn into_diagnostic_message(self) -> DiagnosticMessage
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 moreSource§impl<T> ToCharString for Twhere
T: Display,
impl<T> ToCharString for Twhere
T: Display,
Source§fn try_to_char_string(&self) -> Result<CharString, ToCharStringError>
fn try_to_char_string(&self) -> Result<CharString, ToCharStringError>
Attempts to convert the value to a
CharString. Read moreSource§fn to_char_string(&self) -> CharString
fn to_char_string(&self) -> CharString
Converts the value to a
CharString. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more