pub enum PathLocation {
Local(String),
Remote {
connection: RemoteConnectionInfo,
path: String,
},
}Variants§
Implementations§
Source§impl PathLocation
impl PathLocation
Sourcepub fn parse(path_str: &str) -> Result<Self>
pub fn parse(path_str: &str) -> Result<Self>
Parse a path that might be local or remote Remote paths are in the format: ssh://user@host:port/path or user@host:/path
pub fn is_remote(&self) -> bool
pub fn as_local_path(&self) -> Option<&str>
pub fn as_remote_info(&self) -> Option<(&RemoteConnectionInfo, &str)>
Trait Implementations§
Source§impl Clone for PathLocation
impl Clone for PathLocation
Source§fn clone(&self) -> PathLocation
fn clone(&self) -> PathLocation
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 PathLocation
impl RefUnwindSafe for PathLocation
impl Send for PathLocation
impl Sync for PathLocation
impl Unpin for PathLocation
impl UnwindSafe for PathLocation
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