pub struct Builder { /* private fields */ }Expand description
Thread options (the stack size).
Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Builder
Sourcepub fn stack_size(self, bytes: usize) -> Builder
pub fn stack_size(self, bytes: usize) -> Builder
The thread’s stack (its locals; default DEFAULT_STACK).
Sourcepub fn spawn<F, T>(self, f: F) -> JoinHandle<T>where
F: FnOnce() -> T + 'static,
T: 'static,
pub fn spawn<F, T>(self, f: F) -> JoinHandle<T>where
F: FnOnce() -> T + 'static,
T: 'static,
Start a thread running f; it first runs when the current thread blocks,
yields or waits for a frame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe 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