pub struct RemoteLocation(/* private fields */);Expand description
A remote location as entered: either an already-canonical file, or an unresolved home-relative query on one endpoint.
Implementations§
Source§impl RemoteLocation
impl RemoteLocation
Sourcepub fn parse(value: &str) -> Result<Self, AddressError>
pub fn parse(value: &str) -> Result<Self, AddressError>
Admit one textual location. A raw ~ first component yields the
unresolved home form; everything else must decode to a canonical
absolute file. Pure: no filesystem, no subprocess, no home guessing.
Sourcepub fn endpoint(&self) -> &RemoteEndpoint
pub fn endpoint(&self) -> &RemoteEndpoint
The endpoint this location addresses — the pooled-session identity even before the path is resolved.
Sourcepub fn absolute_file(&self) -> Option<&RemoteFile>
pub fn absolute_file(&self) -> Option<&RemoteFile>
The canonical file, when this location is already absolute and
resolved. A home query returns None: only a session that negotiated
expand-path@openssh.com may publish its canonical identity.
Trait Implementations§
Source§impl Clone for RemoteLocation
impl Clone for RemoteLocation
Source§fn clone(&self) -> RemoteLocation
fn clone(&self) -> RemoteLocation
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 RemoteLocation
impl Debug for RemoteLocation
Source§impl<'de> Deserialize<'de> for RemoteLocation
impl<'de> Deserialize<'de> for RemoteLocation
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for RemoteLocation
impl Display for RemoteLocation
impl Eq for RemoteLocation
Source§impl From<RemoteFile> for RemoteLocation
impl From<RemoteFile> for RemoteLocation
Source§fn from(file: RemoteFile) -> Self
fn from(file: RemoteFile) -> Self
Converts to this type from the input type.
Source§impl Hash for RemoteLocation
impl Hash for RemoteLocation
Source§impl PartialEq for RemoteLocation
impl PartialEq for RemoteLocation
Source§impl Serialize for RemoteLocation
Serde carries the canonical validated URI — one string, re-parsed on
the way in, so stored values can never bypass admission.
impl Serialize for RemoteLocation
Serde carries the canonical validated URI — one string, re-parsed on the way in, so stored values can never bypass admission.
impl StructuralPartialEq for RemoteLocation
Auto Trait Implementations§
impl Freeze for RemoteLocation
impl RefUnwindSafe for RemoteLocation
impl Send for RemoteLocation
impl Sync for RemoteLocation
impl Unpin for RemoteLocation
impl UnsafeUnpin for RemoteLocation
impl UnwindSafe for RemoteLocation
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