product_os_semaphore/
lib.rs#![cfg_attr(any(feature = "nightly", doc), feature(negative_impls))]
#![deny(clippy::all)]
#![warn(clippy::pedantic)]
#![no_std]
extern crate no_std_compat as std;
use std::prelude::v1::*;
pub mod raw;
#[cfg(feature = "wrapper")]
pub mod wrapper;
#[cfg(feature = "wrapper")]
pub use wrapper::*;
#[derive(Clone, Debug)]
#[non_exhaustive]
pub enum SemaphoreError {
AtMaxCount,
}
impl core::fmt::Display for SemaphoreError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
SemaphoreError::AtMaxCount => write!(f, "Already at maximum count!"),
}
}
}
#[cfg(feature = "std")]
impl core_error::Error for SemaphoreError {}