Skip to main content

externally_driven_async_rt/tasks/
slot_waiter_taken_error.rs

1/// An error returned from [`Context::reserve_task`](crate::Context::reserve_task) when all `TASKS`
2/// task slots are taken and another task already waits for a free one.
3#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4pub struct SlotWaiterTakenError;
5
6impl core::fmt::Display for SlotWaiterTakenError {
7    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
8        f.write_str("another task already waits for a free task slot")
9    }
10}
11
12impl core::error::Error for SlotWaiterTakenError {}