Skip to main content

brush_core/sys/
unix.rs

1pub mod async_pipe;
2pub mod commands;
3pub(crate) mod env;
4pub mod fd;
5pub mod fs;
6pub mod input;
7pub(crate) mod network;
8pub mod poll;
9use crate::error;
10pub use crate::sys::tokio_process as process;
11pub mod resource;
12pub mod signal;
13pub mod terminal;
14pub(crate) mod users;
15
16/// Platform-specific errors.
17#[derive(Debug, thiserror::Error)]
18pub enum PlatformError {
19    /// A system error occurred.
20    #[error("system error: {0}")]
21    ErrnoError(#[from] nix::errno::Errno),
22}
23
24impl From<nix::errno::Errno> for error::ErrorKind {
25    fn from(err: nix::errno::Errno) -> Self {
26        PlatformError::ErrnoError(err).into()
27    }
28}