pub struct SubscriberServerHandle<Type, Event, Callback>{ /* private fields */ }
Implementations§
Source§impl<Type, Event, Callback> SubscriberServerHandle<Type, Event, Callback>where
Event: SubscriberEvent<Type = Type>,
Type: SubscriberEventType + 'static,
Callback: SubscriberCallback<Event>,
impl<Type, Event, Callback> SubscriberServerHandle<Type, Event, Callback>where
Event: SubscriberEvent<Type = Type>,
Type: SubscriberEventType + 'static,
Callback: SubscriberCallback<Event>,
pub fn new<Config, Sub, Error>(
server: SubscriberServer<Type, Event, Config, Sub>,
rt: &Handle,
) -> Selfwhere
Config: SubscriberConfig + 'static,
Error: SubscriberError,
Sub: Subscriber<Event, Error> + 'static,
Receiver<Callback>: Send + 'static,
Receiver<Event>: Send + 'static,
pub fn split( self, ) -> (EventHandle<Event>, SubscribeHandle<Type, Callback>, JoinHandle<()>)
Sourcepub fn stop_handle(&self)
pub fn stop_handle(&self)
This does not stop the process, you need to kill it first
pub async fn send(&mut self, event: Event) -> Result<(), SendError>
pub async fn subscribe( &mut self, event_type: Type, callback: Callback, ) -> Result<(), SendError>
Auto Trait Implementations§
impl<Type, Event, Callback> Freeze for SubscriberServerHandle<Type, Event, Callback>
impl<Type, Event, Callback> !RefUnwindSafe for SubscriberServerHandle<Type, Event, Callback>
impl<Type, Event, Callback> Send for SubscriberServerHandle<Type, Event, Callback>
impl<Type, Event, Callback> Sync for SubscriberServerHandle<Type, Event, Callback>
impl<Type, Event, Callback> Unpin for SubscriberServerHandle<Type, Event, Callback>
impl<Type, Event, Callback> !UnwindSafe for SubscriberServerHandle<Type, Event, Callback>
Blanket Implementations§
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