Crate cssh_rs_platform
Expand description
Platform-abstraction traits for cssh-rs.
Defines the surface that per-platform crates
(cssh-rs-platform-windows, -linux, -macos) implement so the
daemon, client, and plugin hosts stay platform-agnostic. M0 scope is
the trait definitions only; concrete impls land alongside the
per-platform crate extractions.
The five traits exposed here cover the entire surface that varies across host operating systems:
LaunchContext- platform-supplied state attached to every child-process spawn (Wayland activation token, Windows console session id, macOS Apple Event session, …).ProcessSpawner- launches the daemon, client consoles, and plugin hosts.ControlChannelServer- server side of one daemon-to-client transport (named pipe on Windows, UNIX socket elsewhere).ControlChannelClient- client side of the same transport.WindowHandleProbe- looks up the window handle owned by a given process id, used by focus tracking.
The control-channel traits use return-position impl Future, which
makes them not dyn-compatible. Platform selection is a compile-time
choice in this crate’s consumers, so the traits are intended for
static dispatch (generic parameters / impl Trait) rather than
Box<dyn ...> storage.
Traits§
- Control
Channel Client - Client endpoint of the daemon-to-client control channel.
- Control
Channel Server - Server endpoint of the daemon-to-client control channel for one client connection.
- Launch
Context - Platform-supplied context required when launching a child process.
- Process
Spawner - Spawns child processes (daemon, client consoles, plugin hosts) on the host platform.
- Window
Handle Probe - Looks up an opaque platform window handle owned by a given process.