Trait duct::ToExecutable [−][src]
pub trait ToExecutable {
fn to_executable(self) -> OsString;
}An implementation detail of cmd, to distinguish paths from
other string types.
Path("foo.sh") means the file named foo.sh in the current directory.
However if you try to execute that path with
std::process::Command,
Unix will get upset that it doesn't have a leading ./. Rust knows that the
string is a path, but that distinction gets lost by the time execution
happens.
To execute relative paths correctly, duct prepends the ./ to them
automatically. This trait captures the distinction between the path types
and other types of strings, which don't get modified. See the trait bounds
on cmd.
Required Methods
fn to_executable(self) -> OsString
Implementations on Foreign Types
impl<'a> ToExecutable for &'a Path[src]
impl<'a> ToExecutable for &'a Pathfn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsStringimpl ToExecutable for PathBuf[src]
impl ToExecutable for PathBuffn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsStringimpl<'a> ToExecutable for &'a PathBuf[src]
impl<'a> ToExecutable for &'a PathBuffn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsStringimpl<'a> ToExecutable for &'a str[src]
impl<'a> ToExecutable for &'a strfn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsStringimpl ToExecutable for String[src]
impl ToExecutable for Stringfn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsStringimpl<'a> ToExecutable for &'a String[src]
impl<'a> ToExecutable for &'a Stringfn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsStringimpl<'a> ToExecutable for &'a OsStr[src]
impl<'a> ToExecutable for &'a OsStrfn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsStringimpl ToExecutable for OsString[src]
impl ToExecutable for OsStringfn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsStringimpl<'a> ToExecutable for &'a OsString[src]
impl<'a> ToExecutable for &'a OsStringfn to_executable(self) -> OsString[src]
fn to_executable(self) -> OsString