pub struct ReadablePath(/* private fields */);Implementations§
Source§impl ReadablePath
impl ReadablePath
pub fn from_url(url: Url) -> ReadablePath
Sourcepub fn from_string(
input: &str,
current_config_path: Option<&ReadablePath>,
) -> Result<ReadablePath, Error>
pub fn from_string( input: &str, current_config_path: Option<&ReadablePath>, ) -> Result<ReadablePath, Error>
get a readable path
- config:
- relative to current_config_path - https://
- uri - file://
- absolute path - py://
/ - ~/
- relative to home dir - relative to cwd - /
- absolute path
pub fn join(&self, file: &str) -> ReadablePath
Trait Implementations§
Source§impl AsRef<Url> for ReadablePath
impl AsRef<Url> for ReadablePath
Source§impl Clone for ReadablePath
impl Clone for ReadablePath
Source§fn clone(&self) -> ReadablePath
fn clone(&self) -> ReadablePath
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 moreSource§impl Debug for ReadablePath
impl Debug for ReadablePath
Source§impl Display for ReadablePath
impl Display for ReadablePath
Source§impl ReadPath for ReadablePath
impl ReadPath for ReadablePath
fn copy(&self, dest: &WritablePath) -> Result<(), PathError>
fn read_to_bytes(&self) -> Result<Vec<u8>, PathError>
fn exists(&self) -> Result<bool, PathError>
fn read_to_string(&self) -> Result<String, PathError>
fn is_utf8(&self) -> Result<bool, PathError>
fn hash(&self) -> Result<u64, PathError>
Auto Trait Implementations§
impl Freeze for ReadablePath
impl RefUnwindSafe for ReadablePath
impl Send for ReadablePath
impl Sync for ReadablePath
impl Unpin for ReadablePath
impl UnwindSafe for ReadablePath
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<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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.