pub trait PlatformInterface {
// Required methods
fn make_shebang_command(
path: &Path,
working_directory: Option<&Path>,
shebang: Shebang<'_>,
) -> Result<Command, OutputError>;
fn set_execute_permission(path: &Path) -> Result<()>;
fn signal_from_exit_status(exit_status: ExitStatus) -> Option<i32>;
fn convert_native_path(
working_directory: &Path,
path: &Path,
) -> Result<String, String>;
}Required Methods§
Sourcefn make_shebang_command(
path: &Path,
working_directory: Option<&Path>,
shebang: Shebang<'_>,
) -> Result<Command, OutputError>
fn make_shebang_command( path: &Path, working_directory: Option<&Path>, shebang: Shebang<'_>, ) -> Result<Command, OutputError>
Construct a command equivalent to running the script at path with the
shebang line shebang
Sourcefn set_execute_permission(path: &Path) -> Result<()>
fn set_execute_permission(path: &Path) -> Result<()>
Set the execute permission on the file pointed to by path
Sourcefn signal_from_exit_status(exit_status: ExitStatus) -> Option<i32>
fn signal_from_exit_status(exit_status: ExitStatus) -> Option<i32>
Extract the signal from a process exit status, if it was terminated by a signal
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl PlatformInterface for Platform
Available on Unix only.