Skip to main content

Scope

Struct Scope 

Source
pub struct Scope<'scope, 'life: 'scope, 'p: 'life, 'd: 'p, S: Plan + 'd = (), Q = ()> { /* private fields */ }

Implementations§

Source§

impl<'scope, 'life: 'scope, 'p: 'life, 'd: 'p, S: Plan + 'd, Q> Scope<'scope, 'life, 'p, 'd, S, Q>

Source

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

Borrows storage while preserving its pinned address.

Source

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

Source

pub fn driver(&mut self) -> Context<'_, 'd>

Source

pub fn hash_state(&mut self, domain: Domain) -> HashState<'d>

Source

pub fn try_root<P: Purpose>(&mut self) -> Result<Root<'d, P>, Exhausted>

Source

pub fn with_app<'report, D, R>( &mut self, report: &'report mut Completion, app: D, f: impl for<'app> FnOnce(App<'app, 'life, 'd, D, Q>) -> R, ) -> Result<'report, R>
where D: App<'d>, Q: Startup,

Source

pub fn request<'report, D>( &mut self, report: &'report mut Completion, app: D, ) -> Result<'report, Result<Requested<Q>, Error>>
where D: App<'d>, Q: Startup,

Runs to shutdown while retaining the exact request and separate drive result.

Source

pub fn run<'report, D>( &mut self, report: &'report mut Completion, app: D, ) -> Result<'report, Result<(), Error>>
where D: App<'d>, Q: Startup,

Source

pub fn with_quiesce<'report, D, R>( &mut self, report: &'report mut Completion, app: D, timeout: Duration, f: impl for<'app> FnOnce(App<'app, 'life, 'd, D, Q>) -> R, ) -> Result<'report, R>
where D: App<'d>, Q: Startup,

Bounds application quiescence after the callback returns. Use App::drive_for or App::run_for to bound execution itself.

Source

pub fn run_quiesce<'report, D>( &mut self, report: &'report mut Completion, app: D, timeout: Duration, ) -> Result<'report, Result<(), Error>>
where D: App<'d>, Q: Startup,

Serves until shutdown, then bounds application quiescence.

Source

pub fn with_at_for<'report, D, R>( &mut self, report: &'report mut Completion, app: D, start: Deadline<'d>, timeout: Duration, f: impl for<'app> FnOnce(Manual<'app, 'life, 'd, D, Q>) -> R, ) -> Result<'report, R>
where D: App<'d>, Q: Startup,

Runs with caller-controlled protocol time and bounds quiescence afterward. The timeout starts after the callback; Manual::drive_for bounds a drive. Later wall-clock applications reject entry until wall time catches up.

Auto Trait Implementations§

§

impl<'scope, 'life, 'p, 'd, S = (), Q = ()> !RefUnwindSafe for Scope<'scope, 'life, 'p, 'd, S, Q>

§

impl<'scope, 'life, 'p, 'd, S = (), Q = ()> !Send for Scope<'scope, 'life, 'p, 'd, S, Q>

§

impl<'scope, 'life, 'p, 'd, S = (), Q = ()> !Sync for Scope<'scope, 'life, 'p, 'd, S, Q>

§

impl<'scope, 'life, 'p, 'd, S = (), Q = ()> !UnwindSafe for Scope<'scope, 'life, 'p, 'd, S, Q>

§

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

§

impl<'scope, 'life, 'p, 'd, S, Q> Freeze for Scope<'scope, 'life, 'p, 'd, S, Q>
where Pin<&'life <S as Plan>::Output<'p, 'd>>: Freeze, &'scope mut Core<'life, 'd, Q>: Freeze,

§

impl<'scope, 'life, 'p, 'd, S, Q> Unpin for Scope<'scope, 'life, 'p, 'd, S, Q>
where Pin<&'life <S as Plan>::Output<'p, 'd>>: Unpin, &'scope mut Core<'life, 'd, Q>: Unpin,

§

impl<'scope, 'life, 'p, 'd, S, Q> UnsafeUnpin for Scope<'scope, 'life, 'p, 'd, S, Q>
where Pin<&'life <S as Plan>::Output<'p, 'd>>: UnsafeUnpin, &'scope mut Core<'life, 'd, Q>: 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.