pub trait PtySystem: Send + Sync {
type Master: PtyMaster;
type Child: PtyChild;
// Required method
fn spawn<S, I>(
program: S,
args: I,
config: &PtyConfig,
) -> impl Future<Output = Result<(Self::Master, Self::Child)>> + Send
where S: AsRef<OsStr> + Send,
I: IntoIterator + Send,
I::Item: AsRef<OsStr>;
// Provided method
fn spawn_shell(
config: &PtyConfig,
) -> impl Future<Output = Result<(Self::Master, Self::Child)>> + Send { ... }
}Expand description
Factory trait for creating PTY sessions.
This trait provides the main entry point for spawning processes in a PTY. Platform-specific implementations handle the details of PTY creation.
Required Associated Types§
Required Methods§
Provided Methods§
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.