[−][src]Struct xtra_addons::Broker
Implementations
impl<T> Broker<T> where
T: Message<Result = ()> + Clone,
[src]
T: Message<Result = ()> + Clone,
pub fn new() -> Self
[src]
pub async fn subscribe<A: Actor + Handler<T>>(
subscriber: Address<A>
) -> Result<Subscription<T>, ()>
[src]
subscriber: Address<A>
) -> Result<Subscription<T>, ()>
pub async fn publish(message: T) -> Result<(), Disconnected>
[src]
Trait Implementations
impl<T> Actor for Broker<T> where
T: Message<Result = ()> + Clone,
[src]
T: Message<Result = ()> + Clone,
#[must_use]pub fn started<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn stopping<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = KeepRunning> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = KeepRunning> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn stopped<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn create(self, message_cap: Option<usize>) -> ActorManager<Self>
[src]
impl<T> Default for Broker<T> where
T: Message<Result = ()> + Clone,
[src]
T: Message<Result = ()> + Clone,
Auto Trait Implementations
impl<T> !RefUnwindSafe for Broker<T>
[src]
impl<T> Send for Broker<T>
[src]
impl<T> Sync for Broker<T>
[src]
impl<T> Unpin for Broker<T>
[src]
impl<T> !UnwindSafe for Broker<T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,