pub struct Multicast { /* private fields */ }Expand description
UDP multicast adapter for LAN peer discovery and sync.
Broadcasts Gun protocol messages to the multicast group 233.255.255.255:7654
and receives messages from other peers on the same LAN. Messages exceeding
the safe UDP datagram size are transparently chunked and reassembled.
Implementations§
Trait Implementations§
Source§impl Actor for Multicast
impl Actor for Multicast
Source§fn subscribe_to_everything(&self) -> bool
fn subscribe_to_everything(&self) -> bool
Returns true — multicast subscribes to all messages.
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: Arc<Message>,
ctx: &'life1 ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: Arc<Message>,
ctx: &'life1 ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle an incoming message. Read more
Source§fn pre_start<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pre_start<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called once before the actor starts processing messages. Read more
Source§fn stopping<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stopping<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called once after the actor’s message loop exits. Read more
Source§fn handle_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
batch: &'life1 mut Vec<Arc<Message>>,
context: &'life2 ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
batch: &'life1 mut Vec<Arc<Message>>,
context: &'life2 ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handle a batch of messages drained from the mailbox. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Multicast
impl !UnwindSafe for Multicast
impl Freeze for Multicast
impl Send for Multicast
impl Sync for Multicast
impl Unpin for Multicast
impl UnsafeUnpin for Multicast
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