pub struct AdvancedSubscriberBuilder<'a, 'b, 'c, Handler, const BACKGROUND: bool = false> { /* private fields */ }
Expand description
The builder of an AdvancedSubscriber
, allowing to configure it.
Implementations§
Source§impl<'a, 'b, 'c> AdvancedSubscriberBuilder<'a, 'b, 'c, DefaultHandler>
impl<'a, 'b, 'c> AdvancedSubscriberBuilder<'a, 'b, 'c, DefaultHandler>
Sourcepub fn callback<F>(
self,
callback: F,
) -> AdvancedSubscriberBuilder<'a, 'b, 'c, Callback<Sample>>
pub fn callback<F>( self, callback: F, ) -> AdvancedSubscriberBuilder<'a, 'b, 'c, Callback<Sample>>
Add callback to AdvancedSubscriber.
Sourcepub fn callback_mut<F>(
self,
callback: F,
) -> AdvancedSubscriberBuilder<'a, 'b, 'c, Callback<Sample>>
pub fn callback_mut<F>( self, callback: F, ) -> AdvancedSubscriberBuilder<'a, 'b, 'c, Callback<Sample>>
Add callback to AdvancedSubscriber
.
Using this guarantees that your callback will never be called concurrently.
If your callback is also accepted by the callback
method, we suggest you use it instead of callback_mut
Sourcepub fn with<Handler>(
self,
handler: Handler,
) -> AdvancedSubscriberBuilder<'a, 'b, 'c, Handler>where
Handler: IntoHandler<Sample>,
pub fn with<Handler>(
self,
handler: Handler,
) -> AdvancedSubscriberBuilder<'a, 'b, 'c, Handler>where
Handler: IntoHandler<Sample>,
Make the built AdvancedSubscriber an AdvancedSubscriber
.
Source§impl<'a, 'b, 'c> AdvancedSubscriberBuilder<'a, 'b, 'c, Callback<Sample>>
impl<'a, 'b, 'c> AdvancedSubscriberBuilder<'a, 'b, 'c, Callback<Sample>>
Sourcepub fn background(
self,
) -> AdvancedSubscriberBuilder<'a, 'b, 'c, Callback<Sample>, true>
pub fn background( self, ) -> AdvancedSubscriberBuilder<'a, 'b, 'c, Callback<Sample>, true>
Register the subscriber callback to be run in background until the session is closed.
Background builder doesn’t return a AdvancedSubscriber
object anymore.
Source§impl<'a, 'c, Handler, const BACKGROUND: bool> AdvancedSubscriberBuilder<'a, '_, 'c, Handler, BACKGROUND>
impl<'a, 'c, Handler, const BACKGROUND: bool> AdvancedSubscriberBuilder<'a, '_, 'c, Handler, BACKGROUND>
Sourcepub fn allowed_origin(self, origin: Locality) -> Self
pub fn allowed_origin(self, origin: Locality) -> Self
Restrict the matching publications that will be receive by this Subscriber
Sourcepub fn recovery(self, conf: RecoveryConfig<Configured>) -> Self
pub fn recovery(self, conf: RecoveryConfig<Configured>) -> Self
Ask for retransmission of detected lost Samples.
Retransmission can only be achieved by AdvancedPublishers
that enable cache
and
sample_miss_detection
.
Sourcepub fn query_timeout(self, query_timeout: Duration) -> Self
pub fn query_timeout(self, query_timeout: Duration) -> Self
Change the timeout to be used for queries (history, retransmission).
Sourcepub fn history(self, config: HistoryConfig) -> Self
pub fn history(self, config: HistoryConfig) -> Self
Enable query for historical data.
History can only be retransmitted by AdvancedPublishers
that enable cache
.
Sourcepub fn subscriber_detection(self) -> Self
pub fn subscriber_detection(self) -> Self
Allow this subscriber to be detected through liveliness.
Sourcepub fn subscriber_detection_metadata<TryIntoKeyExpr>(
self,
meta: TryIntoKeyExpr,
) -> Self
pub fn subscriber_detection_metadata<TryIntoKeyExpr>( self, meta: TryIntoKeyExpr, ) -> Self
A key expression added to the liveliness token key expression.
Trait Implementations§
Source§impl IntoFuture for AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true>
impl IntoFuture for AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true>
Source§type Output = <AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true> as Resolvable>::To
type Output = <AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true> as Resolvable>::To
Source§type IntoFuture = Ready<<AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true> as Resolvable>::To>
type IntoFuture = Ready<<AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true> as Resolvable>::To>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Source§impl<Handler> IntoFuture for AdvancedSubscriberBuilder<'_, '_, '_, Handler>
impl<Handler> IntoFuture for AdvancedSubscriberBuilder<'_, '_, '_, Handler>
Source§type Output = <AdvancedSubscriberBuilder<'_, '_, '_, Handler> as Resolvable>::To
type Output = <AdvancedSubscriberBuilder<'_, '_, '_, Handler> as Resolvable>::To
Source§type IntoFuture = Ready<<AdvancedSubscriberBuilder<'_, '_, '_, Handler> as Resolvable>::To>
type IntoFuture = Ready<<AdvancedSubscriberBuilder<'_, '_, '_, Handler> as Resolvable>::To>
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Source§impl Resolvable for AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true>
impl Resolvable for AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true>
Source§impl<Handler> Resolvable for AdvancedSubscriberBuilder<'_, '_, '_, Handler>
impl<Handler> Resolvable for AdvancedSubscriberBuilder<'_, '_, '_, Handler>
Source§impl Wait for AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true>
impl Wait for AdvancedSubscriberBuilder<'_, '_, '_, Callback<Sample>, true>
Source§fn wait(self) -> <Self as Resolvable>::To
fn wait(self) -> <Self as Resolvable>::To
Source§impl<Handler> Wait for AdvancedSubscriberBuilder<'_, '_, '_, Handler>
impl<Handler> Wait for AdvancedSubscriberBuilder<'_, '_, '_, Handler>
Source§fn wait(self) -> <Self as Resolvable>::To
fn wait(self) -> <Self as Resolvable>::To
Auto Trait Implementations§
impl<'a, 'b, 'c, Handler, const BACKGROUND: bool> Freeze for AdvancedSubscriberBuilder<'a, 'b, 'c, Handler, BACKGROUND>where
Handler: Freeze,
impl<'a, 'b, 'c, Handler, const BACKGROUND: bool = false> !RefUnwindSafe for AdvancedSubscriberBuilder<'a, 'b, 'c, Handler, BACKGROUND>
impl<'a, 'b, 'c, Handler, const BACKGROUND: bool> Send for AdvancedSubscriberBuilder<'a, 'b, 'c, Handler, BACKGROUND>where
Handler: Send,
impl<'a, 'b, 'c, Handler, const BACKGROUND: bool> Sync for AdvancedSubscriberBuilder<'a, 'b, 'c, Handler, BACKGROUND>where
Handler: Sync,
impl<'a, 'b, 'c, Handler, const BACKGROUND: bool> Unpin for AdvancedSubscriberBuilder<'a, 'b, 'c, Handler, BACKGROUND>where
Handler: Unpin,
impl<'a, 'b, 'c, Handler, const BACKGROUND: bool = false> !UnwindSafe for AdvancedSubscriberBuilder<'a, 'b, 'c, Handler, BACKGROUND>
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
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