dope-core 0.77.0

Owned native I/O and completion driver for dope
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::mem;

/// Maximum number of callers in a bounded wait queue.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(transparent)]
pub struct Capacity(usize);

impl Capacity {
    pub const fn new(waiters: usize) -> Self {
        Self(waiters)
    }

    pub const fn get(self) -> usize {
        self.0
    }
}

const _: () = assert!(mem::size_of::<Capacity>() == mem::size_of::<usize>());