pub struct ChannelIo<'s, 'a, B: Bearer> { /* private fields */ }Expand description
Resource scope excludes the charge owner: close/drop cannot relock this ledger.
Implementations§
Source§impl<'a, B: Bearer> ChannelIo<'_, 'a, B>
impl<'a, B: Bearer> ChannelIo<'_, 'a, B>
Sourcepub fn with_current<T>(
&mut self,
pins: &PinAuthority,
clock: &dyn Fn() -> u64,
effect: impl for<'g> FnOnce(FrameIo<'g, 'a, B>, &'g mut CurrentAuthorityGuard<'a>) -> Result<T, E>,
) -> Result<T, E>
pub fn with_current<T>( &mut self, pins: &PinAuthority, clock: &dyn Fn() -> u64, effect: impl for<'g> FnOnce(FrameIo<'g, 'a, B>, &'g mut CurrentAuthorityGuard<'a>) -> Result<T, E>, ) -> Result<T, E>
Acquires ONE current actual-owner guard for this bounded effect only. Both endpoint and application checks use this guard. Never wait/await or call a blocking filesystem operation inside effect. A WouldBlock return drops the guard; the next effect observes real inter-frame revocation.
Auto Trait Implementations§
impl<'s, 'a, B> !UnwindSafe for ChannelIo<'s, 'a, B>
impl<'s, 'a, B> Freeze for ChannelIo<'s, 'a, B>
impl<'s, 'a, B> RefUnwindSafe for ChannelIo<'s, 'a, B>where
B: RefUnwindSafe,
impl<'s, 'a, B> Send for ChannelIo<'s, 'a, B>where
B: Send,
impl<'s, 'a, B> Sync for ChannelIo<'s, 'a, B>where
B: Sync,
impl<'s, 'a, B> Unpin for ChannelIo<'s, 'a, B>
impl<'s, 'a, B> UnsafeUnpin for ChannelIo<'s, 'a, B>
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