pub trait Platform {
// Required methods
fn env(&self, name: &str) -> Option<String>;
fn os(&self) -> Os;
fn stdin_is_tty(&self) -> bool;
fn stdout_is_tty(&self) -> bool;
fn client(&self, config: Config) -> Result<Client, ApiError>;
fn exec(&self, command: &str, stdin: &[u8]) -> Result<i32>;
fn terminal(&self) -> Option<Box<dyn Terminal>>;
}Expand description
What the program asks of the system.
Required Methods§
fn env(&self, name: &str) -> Option<String>
fn os(&self) -> Os
fn stdin_is_tty(&self) -> bool
fn stdout_is_tty(&self) -> bool
Sourcefn client(&self, config: Config) -> Result<Client, ApiError>
fn client(&self, config: Config) -> Result<Client, ApiError>
The API client for this configuration.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".