pub struct SubscriberBuilder<P, K, C, S>{ /* private fields */ }Expand description
A builder for a subscriber
Implementations§
Source§impl<P> SubscriberBuilder<P, NoSelector, NoCallback, NoStorage>
impl<P> SubscriberBuilder<P, NoSelector, NoCallback, NoStorage>
Source§impl<P, K, C, S> SubscriberBuilder<P, K, C, S>
impl<P, K, C, S> SubscriberBuilder<P, K, C, S>
Sourcepub const fn activation_state(self, state: OperationState) -> Self
pub const fn activation_state(self, state: OperationState) -> Self
Set the activation state.
Sourcepub fn delete_callback<CB, F>(self, callback: CB) -> Self
pub fn delete_callback<CB, F>(self, callback: CB) -> Self
Set subscribers callback for delete messages
Sourcepub fn session_id(self, session_id: &str) -> Self
pub fn session_id(self, session_id: &str) -> Self
Set the session id.
Source§impl<P, C, S> SubscriberBuilder<P, NoSelector, C, S>
impl<P, C, S> SubscriberBuilder<P, NoSelector, C, S>
Sourcepub fn selector(self, selector: &str) -> SubscriberBuilder<P, Selector, C, S>
pub fn selector(self, selector: &str) -> SubscriberBuilder<P, Selector, C, S>
Set the full key expression for the Subscriber.
Sourcepub fn topic(self, topic: &str) -> SubscriberBuilder<P, Selector, C, S>
pub fn topic(self, topic: &str) -> SubscriberBuilder<P, Selector, C, S>
Set only the message qualifing part of the Subscriber.
Will be prefixed with Agents prefix.
Source§impl<P, K, S> SubscriberBuilder<P, K, NoCallback, S>
impl<P, K, S> SubscriberBuilder<P, K, NoCallback, S>
Sourcepub fn put_callback<CB, F>(
self,
callback: CB,
) -> SubscriberBuilder<P, K, Callback<ArcPutCallback<P>>, S>
pub fn put_callback<CB, F>( self, callback: CB, ) -> SubscriberBuilder<P, K, Callback<ArcPutCallback<P>>, S>
Set callback for put messages
Source§impl<P, K, C> SubscriberBuilder<P, K, C, NoStorage>
impl<P, K, C> SubscriberBuilder<P, K, C, NoStorage>
Sourcepub fn storage(
self,
storage: Arc<RwLock<HashMap<String, Box<dyn SubscriberTrait>>>>,
) -> SubscriberBuilder<P, K, C, Storage<Box<dyn SubscriberTrait>>>
pub fn storage( self, storage: Arc<RwLock<HashMap<String, Box<dyn SubscriberTrait>>>>, ) -> SubscriberBuilder<P, K, C, Storage<Box<dyn SubscriberTrait>>>
Provide agents storage for the subscriber
Source§impl<P, S> SubscriberBuilder<P, Selector, Callback<ArcPutCallback<P>>, S>
impl<P, S> SubscriberBuilder<P, Selector, Callback<ArcPutCallback<P>>, S>
Sourcepub fn build(self) -> Result<Subscriber<P>>
pub fn build(self) -> Result<Subscriber<P>>
Source§impl<P> SubscriberBuilder<P, Selector, Callback<ArcPutCallback<P>>, Storage<Box<dyn SubscriberTrait>>>
impl<P> SubscriberBuilder<P, Selector, Callback<ArcPutCallback<P>>, Storage<Box<dyn SubscriberTrait>>>
Trait Implementations§
Auto Trait Implementations§
impl<P, K, C, S> Freeze for SubscriberBuilder<P, K, C, S>
impl<P, K, C, S> !RefUnwindSafe for SubscriberBuilder<P, K, C, S>
impl<P, K, C, S> Send for SubscriberBuilder<P, K, C, S>
impl<P, K, C, S> Sync for SubscriberBuilder<P, K, C, S>
impl<P, K, C, S> Unpin for SubscriberBuilder<P, K, C, S>
impl<P, K, C, S> !UnwindSafe for SubscriberBuilder<P, K, C, S>
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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