pub struct EchoedPath(/* private fields */);Expand description
A path the workspace names, shown whole, escaped and bounded.
The workspace names a program a launcher starts or a symlink target’s final
component. Unlike EchoedArgument, the text is never cut at a space or an
=, because a path is not an option with a value. It is bounded to
1024 bytes of escaped text.
§Examples
use std::path::Path;
use mcpls_core::error::EchoedPath;
let path = EchoedPath::new(Path::new("/opt/my tools/a=b/srv"));
assert_eq!(path.as_str(), "/opt/my tools/a=b/srv");Implementations§
Source§impl EchoedPath
impl EchoedPath
Sourcepub fn program(arg: &str) -> Self
pub fn program(arg: &str) -> Self
The program an argument names: its whole path, unless the text reads
as an assignment (an = before any path separator), which is cut at
the = like EchoedArgument so a value that is not a program is not
echoed.
Trait Implementations§
Source§impl Clone for EchoedPath
impl Clone for EchoedPath
Source§impl Debug for EchoedPath
impl Debug for EchoedPath
Source§impl Display for EchoedPath
impl Display for EchoedPath
impl Eq for EchoedPath
Source§impl PartialEq for EchoedPath
impl PartialEq for EchoedPath
impl StructuralPartialEq for EchoedPath
Auto Trait Implementations§
impl Freeze for EchoedPath
impl RefUnwindSafe for EchoedPath
impl Send for EchoedPath
impl Sync for EchoedPath
impl Unpin for EchoedPath
impl UnsafeUnpin for EchoedPath
impl UnwindSafe for EchoedPath
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,
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.