pub struct PathOwned(/* private fields */);Implementations§
Source§impl PathOwned
impl PathOwned
Sourcepub unsafe fn new_unchecked(path: String) -> Self
pub unsafe fn new_unchecked(path: String) -> Self
§Safety
The caller must ensure that the string is valid path string.
pub fn new(path: String) -> Option<Self>
pub fn new_with_capacity(capacity: usize) -> Self
pub fn root() -> PathOwned
pub fn join(self, path: impl AsRef<Path>) -> Option<Self>
pub fn truncate(&mut self, length: usize)
pub fn append(self, path: &str) -> Option<Self>
pub fn revert_parent_directory(&mut self) -> &mut Self
pub fn get_extension(&self) -> Option<&str>
pub fn get_file_name(&self) -> &str
pub fn get_relative_to(&self, path: &PathOwned) -> Option<PathOwned>
pub fn canonicalize(self) -> Self
Methods from Deref<Target = Path>§
pub const ROOT: &'static Path
pub const EMPTY: &'static Path
pub const SYSTEM: &'static Path
pub const SYSTEM_ACCOUNTS: &'static Path
pub const SYSTEM_ACCOUNT_USERS: &'static Path
pub const SYSTEM_ACCOUNT_GROUPS: &'static Path
pub const SYSTEM_EXECUTABLES: &'static Path
pub const SYSTEM_LIBRARIES: &'static Path
pub const SYSTEM_SERVICES: &'static Path
pub const DEVICES: &'static Path
pub const NETWORK_DEVICES: &'static Path
pub const BLUETOOTH_DEVICES: &'static Path
pub const AUDIO_DEVICES: &'static Path
pub const COMPUTE_DEVICES: &'static Path
pub const GRAPHICS_DEVICES: &'static Path
pub const INPUT_DEVICES: &'static Path
pub const RANDOM_DEVICES: &'static Path
pub const STANDARD_IO_DEVICES: &'static Path
pub const STORAGE_DEVICES: &'static Path
pub const TIME_DEVICES: &'static Path
pub const UART_DEVICES: &'static Path
pub const I2C_DEVICES: &'static Path
pub const SPI_DEVICES: &'static Path
pub const ADC_DEVICES: &'static Path
pub const GPIO_DEVICES: &'static Path
pub const PWM_DEVICES: &'static Path
pub const HUMAN_INTERFACE_DEVICES: &'static Path
pub const REAL_TIME_CLOCK: &'static Path
pub const CONFIGURATION: &'static Path
pub const SYSTEM_CONFIGURATION: &'static Path
pub const PACKAGE_CONFIGURATION: &'static Path
pub const APPLICATION_CONFIGURATION: &'static Path
pub const SHARED_CONFIGURATION: &'static Path
pub const APPLICATIONS: &'static Path
pub const APPLICATION_EXECUTABLES: &'static Path
pub const APPLICATION_LIBRARIES: &'static Path
pub const APPLICATION_BUNDLES: &'static Path
pub const DATA: &'static Path
pub const SYSTEM_DATA: &'static Path
pub const SYSTEM_CRASHES: &'static Path
pub const SYSTEM_LOGS: &'static Path
pub const APPLICATION_DATA: &'static Path
pub const SHARED_DATA: &'static Path
pub const USERS: &'static Path
pub const TEMPORARY: &'static Path
pub const TEMPORARY_CACHE: &'static Path
pub const TEMPORARY_SESSIONS: &'static Path
pub fn is_valid(&self) -> bool
pub fn is_absolute(&self) -> bool
pub fn is_root(&self) -> bool
pub fn is_empty(&self) -> bool
pub fn is_canonical(&self) -> bool
pub fn go_parent(&self) -> Option<&Path>
pub fn get_file_prefix(&self) -> Option<&str>
pub fn get_file_name(&self) -> Option<&str>
pub fn get_extension(&self) -> Option<&str>
pub fn set_extension(&self, extension: &str) -> Option<PathOwned>
pub fn strip_prefix<'b>(&'b self, path_prefix: &Path) -> Option<&'b Path>
pub fn strip_prefix_absolute<'b>( &'b self, path_prefix: &Path, ) -> Option<&'b Path>
pub fn strip_suffix<'b>(&'b self, path_suffix: &Path) -> Option<&'b Path>
pub fn get_components(&self) -> Components<'_> ⓘ
pub fn join(&self, path: impl AsRef<Path>) -> Option<PathOwned>
pub fn append(&self, path: &str) -> Option<PathOwned>
pub fn get_length(&self) -> usize
pub fn as_str(&self) -> &str
Trait Implementations§
impl Eq for PathOwned
impl StructuralPartialEq for PathOwned
Auto Trait Implementations§
impl Freeze for PathOwned
impl RefUnwindSafe for PathOwned
impl Send for PathOwned
impl Sync for PathOwned
impl Unpin for PathOwned
impl UnsafeUnpin for PathOwned
impl UnwindSafe for PathOwned
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