pub struct Builder { /* private fields */ }Expand description
Implementations§
Source§impl Builder
impl Builder
Sourcepub const DEFAULT_STACK_SIZE: usize = 0x2000
pub const DEFAULT_STACK_SIZE: usize = 0x2000
Default stack size used when none is specified (8 KiB).
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a builder with default settings: 8 KiB dynamic stack, priority 16, started immediately.
Sourcepub fn halted(self) -> Self
pub fn halted(self) -> Self
Creates the thread in a halted state; call Thread::start to begin execution.
Sourcepub fn stack(self, stack: &'static mut [u8]) -> Self
pub fn stack(self, stack: &'static mut [u8]) -> Self
Uses a caller-provided static buffer as the thread stack instead of allocating one.
Sourcepub fn stack_size(self, size: usize) -> Self
pub fn stack_size(self, size: usize) -> Self
Sets the size in bytes for the dynamically allocated stack.
Auto Trait Implementations§
impl !UnwindSafe for Builder
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more