pub struct BackendSlot { /* private fields */ }Expand description
One configured backend, under the id a queued job addresses it by.
The id is not NotifyBackend::name: that is a &'static str a backend
type answers, so every custom entry reports "custom" and two of them
would be indistinguishable to a job row. It is built from the configuration
instead — email, webhook:<entry>, custom:<entry> — which makes it
stable across a restart, the property a durable payload needs. The same
reasoning gives filter::custom its ACME_FILTER_CHECK_NAME.
Implementations§
Source§impl BackendSlot
impl BackendSlot
Sourcepub fn wants(&self, event: &NotifyEvent) -> bool
pub fn wants(&self, event: &NotifyEvent) -> bool
Whether this backend’s events list admits event.
Sourcepub fn new(
id: impl Into<String>,
backend: Arc<dyn NotifyBackend>,
events: &[String],
) -> Self
pub fn new( id: impl Into<String>, backend: Arc<dyn NotifyBackend>, events: &[String], ) -> Self
Builds a slot directly.
from_config is how one is normally made — it derives the ids from the
configuration, which is what keeps them stable across a restart. This is
for a caller assembling a dispatcher over a backend of its own, which in
practice means a test.
Auto Trait Implementations§
impl !RefUnwindSafe for BackendSlot
impl !UnwindSafe for BackendSlot
impl Freeze for BackendSlot
impl Send for BackendSlot
impl Sync for BackendSlot
impl Unpin for BackendSlot
impl UnsafeUnpin for BackendSlot
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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