pub enum FileTarget {
Local(PathBuf),
Remote(RemoteLocation),
Container {
container: ContainerId,
path: PathBuf,
},
}Expand description
Local paths keep their existing native-byte wire representation; remote targets have an explicit remote envelope, never an ambiguous legacy local-path string.
Variants§
Local(PathBuf)
Remote(RemoteLocation)
Container
A path inside a running container (0037 DC1b) — the path names container bytes; there is never a local interpretation.
Implementations§
Source§impl FileTarget
impl FileTarget
pub fn resource_location(&self) -> Option<ResourceLocation>
pub fn from_location(location: &ResourceLocation) -> Result<Self, AddressError>
pub fn matches_location(&self, location: &ResourceLocation) -> bool
Sourcepub fn parse(value: PathBuf) -> Result<Self, AddressError>
pub fn parse(value: PathBuf) -> Result<Self, AddressError>
Only textual user-entry boundaries interpret the scheme. Filesystem/LSP
callers construct Local directly, including filenames containing ssh:.
pub fn local_path(&self) -> Option<&Path>
Trait Implementations§
Source§impl Clone for FileTarget
impl Clone for FileTarget
Source§fn clone(&self) -> FileTarget
fn clone(&self) -> FileTarget
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 FileTarget
impl Debug for FileTarget
Source§impl<'de> Deserialize<'de> for FileTarget
impl<'de> Deserialize<'de> for FileTarget
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 FileTarget
impl Display for FileTarget
impl Eq for FileTarget
Source§impl PartialEq for FileTarget
impl PartialEq for FileTarget
Source§impl Serialize for FileTarget
impl Serialize for FileTarget
impl StructuralPartialEq for FileTarget
Auto Trait Implementations§
impl Freeze for FileTarget
impl RefUnwindSafe for FileTarget
impl Send for FileTarget
impl Sync for FileTarget
impl Unpin for FileTarget
impl UnsafeUnpin for FileTarget
impl UnwindSafe for FileTarget
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.