cpulimiter 0.2.0

A user-space CPU limiter crate
Documentation
use thiserror::Error;

use crate::limiter::Command;

#[derive(Error, Debug)]
pub enum Error {
    #[error("The target process is dead")]
    DeadTarget,
    #[error("Couldn't spawn the limiting thread")]
    Spawn(#[from] std::io::Error),
    #[error("Couldn't send command to the limiting thread")]
    Send(#[from] std::sync::mpsc::SendError<Command>),
}

pub type Result<T> = core::result::Result<T, Error>;