pub struct ObserverBuilder<P, K, CC, RC, S>{ /* private fields */ }Expand description
The builder for an Observer
Implementations§
Source§impl<P> ObserverBuilder<P, NoSelector, NoCallback, NoCallback, NoStorage>
impl<P> ObserverBuilder<P, NoSelector, NoCallback, NoCallback, NoStorage>
Source§impl<P, K, CC, RC, S> ObserverBuilder<P, K, CC, RC, S>
impl<P, K, CC, RC, S> ObserverBuilder<P, K, CC, RC, 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 session_id(self, session_id: &str) -> Self
pub fn session_id(self, session_id: &str) -> Self
Set the session id.
Source§impl<P, CC, RC, S> ObserverBuilder<P, NoSelector, CC, RC, S>
impl<P, CC, RC, S> ObserverBuilder<P, NoSelector, CC, RC, S>
Source§impl<P, K, RC, S> ObserverBuilder<P, K, NoCallback, RC, S>
impl<P, K, RC, S> ObserverBuilder<P, K, NoCallback, RC, S>
Sourcepub fn control_callback<C, F>(
self,
callback: C,
) -> ObserverBuilder<P, K, Callback<ArcControlCallback<P>>, RC, S>
pub fn control_callback<C, F>( self, callback: C, ) -> ObserverBuilder<P, K, Callback<ArcControlCallback<P>>, RC, S>
Set callback for messages
Source§impl<P, K, CC, S> ObserverBuilder<P, K, CC, NoCallback, S>
impl<P, K, CC, S> ObserverBuilder<P, K, CC, NoCallback, S>
Sourcepub fn result_callback<C, F>(
self,
callback: C,
) -> ObserverBuilder<P, K, CC, Callback<ArcResponseCallback<P>>, S>
pub fn result_callback<C, F>( self, callback: C, ) -> ObserverBuilder<P, K, CC, Callback<ArcResponseCallback<P>>, S>
Set callback for response messages
Source§impl<P, K, CC, RC> ObserverBuilder<P, K, CC, RC, NoStorage>
impl<P, K, CC, RC> ObserverBuilder<P, K, CC, RC, NoStorage>
Sourcepub fn storage(
self,
storage: Arc<RwLock<HashMap<String, Box<dyn ObserverTrait>>>>,
) -> ObserverBuilder<P, K, CC, RC, Storage<Box<dyn ObserverTrait>>>
pub fn storage( self, storage: Arc<RwLock<HashMap<String, Box<dyn ObserverTrait>>>>, ) -> ObserverBuilder<P, K, CC, RC, Storage<Box<dyn ObserverTrait>>>
Provide agents storage for the subscriber
Source§impl<P, S> ObserverBuilder<P, Selector, Callback<ArcControlCallback<P>>, Callback<ArcResponseCallback<P>>, S>
impl<P, S> ObserverBuilder<P, Selector, Callback<ArcControlCallback<P>>, Callback<ArcResponseCallback<P>>, S>
Source§impl<P> ObserverBuilder<P, Selector, Callback<ArcControlCallback<P>>, Callback<ArcResponseCallback<P>>, Storage<Box<dyn ObserverTrait>>>
impl<P> ObserverBuilder<P, Selector, Callback<ArcControlCallback<P>>, Callback<ArcResponseCallback<P>>, Storage<Box<dyn ObserverTrait>>>
Auto Trait Implementations§
impl<P, K, CC, RC, S> Freeze for ObserverBuilder<P, K, CC, RC, S>
impl<P, K, CC, RC, S> !RefUnwindSafe for ObserverBuilder<P, K, CC, RC, S>
impl<P, K, CC, RC, S> Send for ObserverBuilder<P, K, CC, RC, S>
impl<P, K, CC, RC, S> Sync for ObserverBuilder<P, K, CC, RC, S>
impl<P, K, CC, RC, S> Unpin for ObserverBuilder<P, K, CC, RC, S>
impl<P, K, CC, RC, S> !UnwindSafe for ObserverBuilder<P, K, CC, RC, 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> 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