pub struct BreadThread<'lt, Tag: 'static> { /* private fields */ }
👎Deprecated: It is probably a bad idea to use this crate
Expand description
A runtime for allowing thread unsafe code to be run on a designated thread.
Implementations§
Source§impl<'lt, Tag: 'static> BreadThread<'lt, Tag>
impl<'lt, Tag: 'static> BreadThread<'lt, Tag>
Sourcepub fn undriven() -> (Self, Driver<'lt, Unpinned>)
👎Deprecated: It is probably a bad idea to use this crate
pub fn undriven() -> (Self, Driver<'lt, Unpinned>)
Creates a new BreadThread
along with a Driver
.
This method can be used to use the current thread as the driving thread, if that is desired.
Sourcepub fn run<Input: 'lt + Wrapped<Tag>, NtsOutput: 'lt + Send + Sync, TsOutput: 'lt + Wrapped<Tag>>(
&self,
input: Input,
op: impl FnOnce(Input::Unwrapped) -> DirectiveOutput<NtsOutput, TsOutput::Unwrapped> + Send + 'lt,
) -> Value<(NtsOutput, TsOutput)> ⓘ
👎Deprecated: It is probably a bad idea to use this crate
pub fn run<Input: 'lt + Wrapped<Tag>, NtsOutput: 'lt + Send + Sync, TsOutput: 'lt + Wrapped<Tag>>( &self, input: Input, op: impl FnOnce(Input::Unwrapped) -> DirectiveOutput<NtsOutput, TsOutput::Unwrapped> + Send + 'lt, ) -> Value<(NtsOutput, TsOutput)> ⓘ
Send a new directive to the thread to be polled and used.
Source§impl<'lt, Tag: 'static> BreadThread<'lt, Tag>
impl<'lt, Tag: 'static> BreadThread<'lt, Tag>
Trait Implementations§
Auto Trait Implementations§
impl<'lt, Tag> Freeze for BreadThread<'lt, Tag>
impl<'lt, Tag> RefUnwindSafe for BreadThread<'lt, Tag>where
Tag: RefUnwindSafe,
impl<'lt, Tag> Send for BreadThread<'lt, Tag>where
Tag: Send,
impl<'lt, Tag> Sync for BreadThread<'lt, Tag>where
Tag: Sync,
impl<'lt, Tag> Unpin for BreadThread<'lt, Tag>where
Tag: Unpin,
impl<'lt, Tag> UnwindSafe for BreadThread<'lt, Tag>where
Tag: UnwindSafe,
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