pub struct PathConverter { /* private fields */ }Expand description
Path converter for Windows ↔ Unix conversion
Implementations§
Source§impl PathConverter
impl PathConverter
Sourcepub fn new(config: &PathConfig) -> Self
pub fn new(config: &PathConfig) -> Self
Sourcepub fn convert(&self, path: &str, target_style: PathStyle) -> PathResult<String>
pub fn convert(&self, path: &str, target_style: PathStyle) -> PathResult<String>
Convert path to specified style
§Errors
Returns PathError if the path cannot be converted or the format is unsupported.
Sourcepub fn detect_style(&self, path: &str) -> PathResult<PathStyle>
pub fn detect_style(&self, path: &str) -> PathResult<PathStyle>
Detect path style
§Errors
Returns PathError if detection fails (though currently it always succeeds or returns default).
Trait Implementations§
Source§impl Clone for PathConverter
impl Clone for PathConverter
Source§fn clone(&self) -> PathConverter
fn clone(&self) -> PathConverter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PathConverter
impl RefUnwindSafe for PathConverter
impl Send for PathConverter
impl Sync for PathConverter
impl Unpin for PathConverter
impl UnwindSafe for PathConverter
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