SubscriberServerHandle

Struct SubscriberServerHandle 

Source
pub struct SubscriberServerHandle<Type, Event, Callback>
where Event: SubscriberEvent, Type: SubscriberEventType, Callback: SubscriberCallback<Event>,
{ /* private fields */ }

Implementations§

Source§

impl<Type, Event, Callback> SubscriberServerHandle<Type, Event, Callback>
where Event: SubscriberEvent<Type = Type>, Type: SubscriberEventType + 'static, Callback: SubscriberCallback<Event>,

Source

pub fn new<Config, Sub, Error>( server: SubscriberServer<Type, Event, Config, Sub>, rt: &Handle, ) -> Self
where Config: SubscriberConfig + 'static, Error: SubscriberError, Sub: Subscriber<Event, Error> + 'static, Receiver<Callback>: Send + 'static, Receiver<Event>: Send + 'static,

Source

pub fn split( self, ) -> (EventHandle<Event>, SubscribeHandle<Type, Callback>, JoinHandle<()>)

Source

pub fn stop_handle(&self)

This does not stop the process, you need to kill it first

Source

pub async fn send(&mut self, event: Event) -> Result<(), SendError>

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.