pub struct RuntimeParents<'host> { /* private fields */ }Expand description
Exclusive registration of real table BINDINGS, with no long-lived locks. One retained runtime initially. Independent ledger admissions remain possible.
Implementations§
Source§impl<'host> RuntimeParents<'host>
impl<'host> RuntimeParents<'host>
pub fn adopt( ledger: &'host Mutex<ReservationLedger>, leases: &'host mut Mutex<LeaseTable>, operations: &'host mut Mutex<OperationTable>, scheduler: &'host mut Mutex<FairScheduler>, governor: &'host ResourceGovernor, ) -> Result<Self, E>
pub fn admit<'p>( &'p self, profile: RuntimeProfile, control: ResourceBudget, ) -> Result<RetainedRuntime<'p, 'host>, E>
Source§impl<'host> RuntimeParents<'host>
impl<'host> RuntimeParents<'host>
Sourcepub fn try_with_runtime<T>(
&self,
state: &mut RetainedRuntime<'_, '_>,
effect: impl for<'b, 'p> FnOnce(RuntimeAccess<'b, 'p>) -> Result<T, E>,
) -> Result<T, E>
pub fn try_with_runtime<T>( &self, state: &mut RetainedRuntime<'_, '_>, effect: impl for<'b, 'p> FnOnce(RuntimeAccess<'b, 'p>) -> Result<T, E>, ) -> Result<T, E>
One bounded nonblocking poll; all parent locks are released on return. No guard/borrow may escape. Never wait for peer or synchronous disk flush.
Auto Trait Implementations§
impl<'host> !Freeze for RuntimeParents<'host>
impl<'host> RefUnwindSafe for RuntimeParents<'host>
impl<'host> Send for RuntimeParents<'host>
impl<'host> Sync for RuntimeParents<'host>
impl<'host> Unpin for RuntimeParents<'host>
impl<'host> UnsafeUnpin for RuntimeParents<'host>
impl<'host> UnwindSafe for RuntimeParents<'host>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more