Skip to main content

Worker

Struct Worker 

Source
pub struct Worker<'scope, 'life: 'scope, 'p: 'life, 'd: 'p, S: Plan + 'd, I: 'd, Q: 'd> { /* private fields */ }
Expand description

Generative worker scope after storage construction and before application install.

Implementations§

Source§

impl<'scope, 'life: 'scope, 'p: 'life, 'd: 'p, S, I, Q> Worker<'scope, 'life, 'p, 'd, S, I, Q>
where S: Plan + 'd, I: 'd, Q: Startup + 'd,

Source

pub fn storage(&self) -> &'life S::Output<'p, 'd>

Borrows storage from the exact prepared domain.

Source

pub fn lend<R>( self, compose: impl FnOnce(I, &mut Stage<'_, 'scope, 'life, 'p, 'd, S, Q>) -> R, ) -> R

Consumes the retained specification in one lexical lending scope.

Source

pub fn with<N, R, E>(self, next: N) -> Result<R, E>
where I: for<'stage> Installer<Stage<'stage, 'scope, 'life, 'p, 'd, S, Q>, N, Output = R, Error = E>,

Runs the retained installer and consumer inside their storage loans.

Source

pub fn install_with<A, R, E>( self, install: impl FnOnce(I, &Boot<'_, 'scope, 'life, 'p, 'd, S, Q>) -> R, ) -> Result<Application<'scope, 'life, 'p, 'd, S, A, Q>, InstallError<E>>
where A: App<'d>, R: Root<'d, Output = Result<A, E>>,

Drives a yielding installation before publishing the resulting application. Rejects existing native work and cancels the unpolled root on admission failure.

Source§

impl<'scope, 'life: 'scope, 'p: 'life, 'd: 'p, S, I, Q> Worker<'scope, 'life, 'p, 'd, S, I, Q>
where S: Plan + 'd, I: Installer<S> + 'd, Q: Startup + 'd,

Source

pub fn install( self, ) -> Result<Application<'scope, 'life, 'p, 'd, S, I::App<'life, 'p, 'd>, Q>, I::Error>

Trait Implementations§

Source§

impl<'scope, 'life, 'p, 'd, S, I, T, Q> Operation<'d, Worker<'scope, 'life, 'p, 'd, S, (I, T), Q>> for Compose
where S: Plan, Q: Startup, I: ComposeFrom<S, T, Q>,

Source§

type Output = Result<<I as ComposeFrom<S, T, Q>>::Output, <I as ComposeFrom<S, T, Q>>::Error>

Source§

fn run( self, worker: Worker<'scope, 'life, 'p, 'd, S, (I, T), Q>, ) -> Self::Output
where Self: 'd,

Source§

impl<'report, 'scope, 'life, 'p, 'd, S, I, Q> Operation<'d, Worker<'scope, 'life, 'p, 'd, S, I, Q>> for Run<'report>
where S: Plan, Q: Startup, I: Execute<S>,

Source§

type Output = Result<Requested<Q>, Failure<'report, <I as Execute<S>>::Error, Requested<Q>>>

Source§

fn run(self, worker: Worker<'scope, 'life, 'p, 'd, S, I, Q>) -> Self::Output
where Self: 'd,

Auto Trait Implementations§

§

impl<'scope, 'life, 'p, 'd, S, I, Q> !RefUnwindSafe for Worker<'scope, 'life, 'p, 'd, S, I, Q>

§

impl<'scope, 'life, 'p, 'd, S, I, Q> !Send for Worker<'scope, 'life, 'p, 'd, S, I, Q>

§

impl<'scope, 'life, 'p, 'd, S, I, Q> !Sync for Worker<'scope, 'life, 'p, 'd, S, I, Q>

§

impl<'scope, 'life, 'p, 'd, S, I, Q> !UnwindSafe for Worker<'scope, 'life, 'p, 'd, S, I, Q>

§

impl<'scope, 'life, 'p, 'd, S, I, Q> Forget for Worker<'scope, 'life, 'p, 'd, S, I, Q>

§

impl<'scope, 'life, 'p, 'd, S, I, Q> Freeze for Worker<'scope, 'life, 'p, 'd, S, I, Q>
where Scope<'scope, 'life, 'p, 'd, S, Q>: Freeze, I: Freeze,

§

impl<'scope, 'life, 'p, 'd, S, I, Q> Unpin for Worker<'scope, 'life, 'p, 'd, S, I, Q>
where Scope<'scope, 'life, 'p, 'd, S, Q>: Unpin, I: Unpin,

§

impl<'scope, 'life, 'p, 'd, S, I, Q> UnsafeUnpin for Worker<'scope, 'life, 'p, 'd, S, I, Q>
where Scope<'scope, 'life, 'p, 'd, S, Q>: UnsafeUnpin, I: UnsafeUnpin,

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> Convert<T> for T

Source§

fn into(self) -> T

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.