pub struct EventPublication { /* private fields */ }Implementations§
Source§impl EventPublication
impl EventPublication
Sourcepub fn publish(&self, send: impl FnOnce()) -> bool
pub fn publish(&self, send: impl FnOnce()) -> bool
Only synchronous sends belong in this closure. An async producer cannot keep a publication permit across suspension and delay a successor.
pub fn touch(&self)
pub fn last_event_at(&self) -> Option<DateTime<Utc>>
pub async fn retire(&self)
Sourcepub fn retire_if_idle(&self) -> bool
pub fn retire_if_idle(&self) -> bool
Maintenance removes an entry only once admitted publications have exited.
Trait Implementations§
Source§impl Debug for EventPublication
impl Debug for EventPublication
Source§impl Default for EventPublication
impl Default for EventPublication
Source§fn default() -> EventPublication
fn default() -> EventPublication
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for EventPublication
impl RefUnwindSafe for EventPublication
impl Send for EventPublication
impl Sync for EventPublication
impl Unpin for EventPublication
impl UnsafeUnpin for EventPublication
impl UnwindSafe for EventPublication
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