pub trait Thread: Source {
type Cpus: DoubleEndedIterator<Item = Cpu> + ExactSizeIterator + FusedIterator;
type Timer: Timer;
type Receiver: Receiver;
// Required methods
fn current() -> Result<Self::Cpus, Error>;
fn bind(cpu: Cpu) -> Result<(), Error>;
fn is_main() -> bool;
// Provided methods
fn try_crc32() -> Result<bool, Errno> { ... }
fn entropy<const N: usize>(
bytes: &mut MaybeUninit<[u8; N]>,
) -> Result<&mut [u8; N], Errno> { ... }
}Expand description
Native thread services and their backend-specific signal and timer owners.
Required Associated Types§
type Cpus: DoubleEndedIterator<Item = Cpu> + ExactSizeIterator + FusedIterator
type Timer: Timer
type Receiver: Receiver
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".