pub struct ProtectedChannel<'a, B: Bearer> { /* private fields */ }Expand description
Consumed endpoint plus actual bearer. No Clone, key accessor or reinstallation. Drop closes the bearer/erases local buffers but deliberately retains the canonical charge. Use try_close after actual I/O has drained to release it.
Implementations§
Source§impl<B: Bearer> ProtectedChannel<'_, B>
impl<B: Bearer> ProtectedChannel<'_, B>
pub const fn transcript(&self) -> StrongDigest
pub const fn intent(&self) -> Intent
pub const fn role(&self) -> Role
pub const fn route(&self) -> Route
pub const fn negotiated_mtu(&self) -> u16
pub const fn pending_frame_bytes(&self) -> usize
Source§impl<'a, B: Bearer> ProtectedChannel<'a, B>
impl<'a, B: Bearer> ProtectedChannel<'a, B>
Sourcepub fn with_runtime_scope<'b, 'p, T>(
&mut self,
access: RuntimeAccess<'b, 'p>,
effect: impl for<'s> FnOnce(ChannelIo<'s, 'a, B>, RuntimeAccess<'b, 'p>) -> Result<T, E>,
) -> Result<T, E>
pub fn with_runtime_scope<'b, 'p, T>( &mut self, access: RuntimeAccess<'b, 'p>, effect: impl for<'s> FnOnce(ChannelIo<'s, 'a, B>, RuntimeAccess<'b, 'p>) -> Result<T, E>, ) -> Result<T, E>
Consume the opaque actual runtime view and lend it beside channel I/O. The canonical parent ledger is ALREADY locked/checked. Never relock it. No new charge, authority, keys, slot owner or generation is created.
Source§impl<'a, B: Bearer> ProtectedChannel<'a, B>
impl<'a, B: Bearer> ProtectedChannel<'a, B>
Sourcepub fn with_resources<T>(
&mut self,
effect: impl for<'s> FnOnce(ChannelIo<'s, 'a, B>, &'s mut ReservationLedger) -> Result<T, E>,
) -> Result<T, E>
pub fn with_resources<T>( &mut self, effect: impl for<'s> FnOnce(ChannelIo<'s, 'a, B>, &'s mut ReservationLedger) -> Result<T, E>, ) -> Result<T, E>
Lock order: original ledger -> SHORT authority guard. This callback is bounded and nonblocking; never loop/wait for a peer or retain authority across polls. Existing TransferRuntime cannot survive releasing this borrowed ledger: a canonical persistent-state split is required before asynchronous service integration. No reference can escape this callback.
Trait Implementations§
Source§impl<B: Bearer> Drop for ProtectedChannel<'_, B>
impl<B: Bearer> Drop for ProtectedChannel<'_, B>
Auto Trait Implementations§
impl<'a, B> Freeze for ProtectedChannel<'a, B>where
B: Freeze,
impl<'a, B> RefUnwindSafe for ProtectedChannel<'a, B>where
B: RefUnwindSafe,
impl<'a, B> Send for ProtectedChannel<'a, B>where
B: Send,
impl<'a, B> Sync for ProtectedChannel<'a, B>where
B: Sync,
impl<'a, B> Unpin for ProtectedChannel<'a, B>where
B: Unpin,
impl<'a, B> UnsafeUnpin for ProtectedChannel<'a, B>where
B: UnsafeUnpin,
impl<'a, B> UnwindSafe for ProtectedChannel<'a, B>where
B: UnwindSafe,
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>,
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
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> ⓘ
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> ⓘ
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