Skip to main content

WorkerHandleBuilder

Struct WorkerHandleBuilder 

Source
pub struct WorkerHandleBuilder<D, F, Fut, S: WorkerTemplate>
where D: Send, Fut: Future<Output = Result<()>> + Send + 'static, Fut::Output: Send + 'static, F: Fn(D, MainProgress<S>) -> Fut,
{ /* private fields */ }

Implementations§

Source§

impl<D, F, Fut, S: WorkerTemplate> WorkerHandleBuilder<D, F, Fut, S>
where D: Send, Fut: Future<Output = Result<()>> + Send + 'static, Fut::Output: Send + 'static, F: Fn(D, MainProgress<S>) -> Fut,

Source

pub fn fn_ptr(self, f: F) -> Self

Source

pub fn main_ui(self, ui: MainProgress<S>) -> Self

Source

pub fn receiver(self, receiver: Receiver<D>) -> Self

Source

pub fn build(self, uid: Uid) -> Result<WorkerHandle<D, F, Fut, S>>

Trait Implementations§

Source§

impl<D, F, Fut, S: WorkerTemplate> Default for WorkerHandleBuilder<D, F, Fut, S>
where D: Send, Fut: Future<Output = Result<()>> + Send + 'static, Fut::Output: Send + 'static, F: Fn(D, MainProgress<S>) -> Fut,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<D, F, Fut, S> Freeze for WorkerHandleBuilder<D, F, Fut, S>

§

impl<D, F, Fut, S> RefUnwindSafe for WorkerHandleBuilder<D, F, Fut, S>

§

impl<D, F, Fut, S> Send for WorkerHandleBuilder<D, F, Fut, S>

§

impl<D, F, Fut, S> Sync for WorkerHandleBuilder<D, F, Fut, S>

§

impl<D, F, Fut, S> Unpin for WorkerHandleBuilder<D, F, Fut, S>

§

impl<D, F, Fut, S> UnsafeUnpin for WorkerHandleBuilder<D, F, Fut, S>

§

impl<D, F, Fut, S> UnwindSafe for WorkerHandleBuilder<D, F, Fut, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.