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.
Sourcepub fn home_relative(&self) -> Option<&Path>
pub fn home_relative(&self) -> Option<&Path>
The unresolved home-relative bytes (~/log), exactly as decoded.
Trait Implementations§
Source§impl Clone for RemoteLocation
impl Clone for RemoteLocation
Source§fn clone(&self) -> RemoteLocation
fn clone(&self) -> RemoteLocation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>
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
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.