Skip to main content

Pair

Struct Pair 

Source
pub struct Pair<'d, A: Root<'d>, B: Root<'d>> { /* private fields */ }
Expand description

Owns two providers and issues their clients in the same lending scope. Both pinned roots remain owned until their dependent application is released.

Implementations§

Source§

impl<'d, A: Root<'d>, B: Root<'d>> Pair<'d, A, B>

Source

pub const fn new(first: A, second: B) -> Self

Trait Implementations§

Source§

impl<'d, A, B> App<'d> for Pair<'d, A, B>
where A: App<'d> + Root<'d>, B: App<'d> + Root<'d>,

SAFETY: each lifecycle operation visits all declared owners once, in declaration order, through the same pinned projections and presence. The root stays pinned through finish and retains each operation’s authority.

Source§

unsafe fn park<'__app, '__driver, '__turn, '__root>( __app: Pin<&'__app mut Self>, __plan: &mut Self::ParkPlan, __park: Park<'__driver, '__turn, '__root, 'd>, )
where 'd: '__driver + '__turn + '__root,

§Safety

The authority and prepared plan belong to this exact installed pinned root.

Source§

unsafe fn activate<'__app, '__driver, '__turn, '__root>( __app: Pin<&'__app mut Self>, __activate: Activate<'__driver, '__turn, '__root, 'd>, ) -> bool
where 'd: '__driver + '__turn + '__root,

§Safety

The operation and selected route belong to this exact installed pinned root.

Source§

const ROUTES: Routes

Source§

const WAKE_ROUTES: Routes

Routes whose installed owners may receive activation.
Source§

const COORDS: usize

Upper bound on idle coordinator probes, including delegated probes.
Source§

fn admit(__app: Pin<&Self>, __needs: &mut Needs) -> Result<(), Claim>

Accumulates the routes of the owners actually present in this pinned root.
Source§

fn released<'__app>(__call: Released<'__app, Self>) -> Released<'__app, Self>

Source§

fn install<'__app, '__owner>( __install: Install<'__app, '__owner, 'd, Self>, ) -> Install<'__app, '__owner, 'd, Self>

Source§

fn dispatch<'__app, '__driver, '__turn, '__root>( __dispatch: Dispatch<'__app, '__driver, '__turn, '__root, 'd, Self>, ) -> ControlFlow<Event<'d>>
where Self: '__root, 'd: '__root,

Source§

fn progress(__app: Pin<&Self>, __progress: Progress<'_, '_, 'd>) -> Progress<'d>

Source§

fn stopping(__app: Pin<&Self>, __progress: Progress<'_, '_, 'd>) -> Progress<'d>

Source§

fn select_park() -> Option<Self::ParkPlan>

Source§

fn prepare_park(__app: Pin<&Self>, __plan: &mut Self::ParkPlan) -> Option<Count>

Prepares the selected coordinator shares once after installation. The count does not exceed COORDS; field presence and shares remain stable through finish. None reports count overflow.
Source§

fn shutdown<'__app, '__turn, '__driver, '__owner>( __shutdown: Shutdown<'__app, '__turn, '__driver, '__owner, 'd, Self>, ) -> Shutdown<'__app, '__turn, '__driver, '__owner, 'd, Self>
where 'd: '__owner,

Source§

fn finish<'__app, '__finish, '__owner, '__epoch>( __finish: Finish<'__app, '__finish, '__owner, '__epoch, 'd, Self>, ) -> Finish<'__app, '__finish, '__owner, '__epoch, 'd, Self>

Source§

impl<'d, A, B> Layout<'d> for Pair<'d, A, B>
where A: Layout<'d> + Root<'d>, B: Layout<'d> + Root<'d>,

Source§

type ParkPlan = (Cursor<2>, Cursor<2>, Cursor<2>, Option<<A as Layout<'d>>::ParkPlan>, Option<<B as Layout<'d>>::ParkPlan>, Weights<2>)

Pre-park state selected once and retained with this pinned application.
Source§

impl<'d, A: Root<'d>, B: Root<'d>> Provider<'d> for Pair<'d, A, B>

Source§

type Client<'app> = (<<A as Root<'d>>::Provider as Provider<'d>>::Client<'app>, <<B as Root<'d>>::Provider as Provider<'d>>::Client<'app>)
where Self: 'app, 'd: 'app,

Source§

fn provide<'app>(context: Context<'_, 'app, 'd, Self>) -> Self::Client<'app>
where Self: 'app, 'd: 'app,

Source§

impl<'d, A, B> Resume<'d> for Pair<'d, A, B>
where A: Root<'d> + Resume<'d>, B: Root<'d> + Resume<'d>,

Source§

impl<'pin, 'd, A: Root<'d>, B: Root<'d>> Unpin for Pair<'d, A, B>
where PinnedFieldsOf<__Pair<'pin, 'd, A, B>>: Unpin,

Auto Trait Implementations§

§

impl<'d, A, B> !RefUnwindSafe for Pair<'d, A, B>

§

impl<'d, A, B> !Send for Pair<'d, A, B>

§

impl<'d, A, B> !Sync for Pair<'d, A, B>

§

impl<'d, A, B> !UnwindSafe for Pair<'d, A, B>

§

impl<'d, A, B> Freeze for Pair<'d, A, B>
where PhantomData<(Reference<'d>, *const <A as Root<'d>>::Provider, *const <B as Root<'d>>::Provider)>: Freeze, A: Freeze, B: Freeze,

§

impl<'d, A, B> UnsafeUnpin for Pair<'d, A, B>

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<'d, P> Root<'d> for P
where P: Provider<'d>,

Source§

type Provider = P

Source§

fn provider(self: Pin<&P>) -> Pin<&<P as Root<'d>>::Provider>

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.