pub(super) struct ModernResourceDelivery {
handle: String,
inner: Mutex<ModernResourceInner>,
_permit: Arc<OwnedSemaphorePermit>,
}Fields§
§handle: String§inner: Mutex<ModernResourceInner>§_permit: Arc<OwnedSemaphorePermit>Implementations§
Source§impl ModernResourceDelivery
impl ModernResourceDelivery
pub(super) fn new(handle: String, permit: Arc<OwnedSemaphorePermit>) -> Self
Sourcepub fn enqueue(&self, event: Value) -> Option<PendingModernNotification>
pub fn enqueue(&self, event: Value) -> Option<PendingModernNotification>
Queue one already-authorized event. At most one notification future may be pending per handle; additional pushes remain visible through read and are coalesced behind that notification.
pub async fn send_pending_notification(&self, work: PendingModernNotification)
pub(super) fn attach_listener( &self, sink: SubscriptionSink, ) -> Result<(u64, CancellationToken, Option<PendingModernNotification>), String>
pub(super) fn detach_listener_if(&self, listener_token: u64)
pub(super) fn close(&self)
pub(super) fn drain(&self) -> Result<(Vec<Value>, u64), String>
pub(super) fn lock_inner(&self) -> MutexGuard<'_, ModernResourceInner>
Auto Trait Implementations§
impl !Freeze for ModernResourceDelivery
impl RefUnwindSafe for ModernResourceDelivery
impl Send for ModernResourceDelivery
impl Sync for ModernResourceDelivery
impl Unpin for ModernResourceDelivery
impl UnsafeUnpin for ModernResourceDelivery
impl UnwindSafe for ModernResourceDelivery
Blanket Implementations§
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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