pub struct Delivery<T> { /* private fields */ }Expand description
Delivers notices: see the module docs.
Implementations§
Source§impl<T: Transport> Delivery<T>
impl<T: Transport> Delivery<T>
pub fn new( hosts: Arc<Hosts>, operator: Arc<Operator>, vapid: Arc<VapidKey>, transport: T, retry: RetryPolicy, ) -> Arc<Self> ⓘ
Sourcepub async fn run(self: Arc<Self>, notices: Notices)
pub async fn run(self: Arc<Self>, notices: Notices)
Deliver every notice queued, one after another, until the process ends. A notice that cannot be delivered is logged; the next one is tried all the same.
Sourcepub async fn deliver(
self: &Arc<Self>,
notice: &Notice,
) -> Result<Vec<(String, Outcome)>>
pub async fn deliver( self: &Arc<Self>, notice: &Notice, ) -> Result<Vec<(String, Outcome)>>
Deliver notice to every subscription, at most MAX_IN_FLIGHT at
once: each subscription’s outcome, by its id. Expired subscriptions
are removed first and get nothing; a muted hat gets nothing.
Sourcepub async fn deliver_guarded(
self: &Arc<Self>,
notice: &Notice,
guard: NoticeGuard,
) -> Result<Vec<(String, Outcome)>>
pub async fn deliver_guarded( self: &Arc<Self>, notice: &Notice, guard: NoticeGuard, ) -> Result<Vec<(String, Outcome)>>
Eligibility is checked before payload construction and each transport attempt. An attempt admitted before revocation may complete; external copies cannot be recalled.
Auto Trait Implementations§
impl<T> !Freeze for Delivery<T>
impl<T> !RefUnwindSafe for Delivery<T>
impl<T> !UnwindSafe for Delivery<T>
impl<T> Send for Delivery<T>where
T: Send,
impl<T> Sync for Delivery<T>where
T: Sync,
impl<T> Unpin for Delivery<T>where
T: Unpin,
impl<T> UnsafeUnpin for Delivery<T>where
T: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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