pub struct RemoteFile { /* private fields */ }Expand description
A canonical absolute remote file on one endpoint.
Implementations§
Source§impl RemoteFile
impl RemoteFile
Sourcepub fn parse(value: &str) -> Result<Self, AddressError>
pub fn parse(value: &str) -> Result<Self, AddressError>
Admit one canonical file location ssh://[user@]host[:port]/abs/path.
A home query (/~/…) is refused: it is not canonical until a session
expands it. Pure: no filesystem, no subprocess.
Sourcepub fn endpoint(&self) -> &RemoteEndpoint
pub fn endpoint(&self) -> &RemoteEndpoint
The endpoint this file lives on — the pooled-session identity.
Sourcepub fn with_path(&self, path: PathBuf) -> Result<Self, AddressError>
pub fn with_path(&self, path: PathBuf) -> Result<Self, AddressError>
The same endpoint addressing a different absolute native path: navigating a directory entry, a resolved home, a Git target. The path is admitted (absolute, no NUL, natively representable); it is never trimmed or normalized.
Sourcepub fn from_path(
endpoint: RemoteEndpoint,
path: PathBuf,
) -> Result<Self, AddressError>
pub fn from_path( endpoint: RemoteEndpoint, path: PathBuf, ) -> Result<Self, AddressError>
Shared checked constructor: endpoint + already-native path bytes.
Trait Implementations§
Source§impl Clone for RemoteFile
impl Clone for RemoteFile
Source§fn clone(&self) -> RemoteFile
fn clone(&self) -> RemoteFile
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 RemoteFile
impl Debug for RemoteFile
Source§impl<'de> Deserialize<'de> for RemoteFile
impl<'de> Deserialize<'de> for RemoteFile
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 RemoteFile
impl Display for RemoteFile
impl Eq for RemoteFile
Source§impl From<RemoteFile> for RemoteEndpoint
impl From<RemoteFile> for RemoteEndpoint
Source§fn from(file: RemoteFile) -> Self
fn from(file: RemoteFile) -> Self
Converts to this type from the input type.
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 RemoteFile
impl Hash for RemoteFile
Source§impl PartialEq for RemoteFile
impl PartialEq for RemoteFile
Source§impl Serialize for RemoteFile
Serde carries the canonical validated URI — one string, re-parsed on
the way in, so stored values can never bypass admission.
impl Serialize for RemoteFile
Serde carries the canonical validated URI — one string, re-parsed on the way in, so stored values can never bypass admission.
Auto Trait Implementations§
impl Freeze for RemoteFile
impl RefUnwindSafe for RemoteFile
impl Send for RemoteFile
impl Sync for RemoteFile
impl Unpin for RemoteFile
impl UnsafeUnpin for RemoteFile
impl UnwindSafe for RemoteFile
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