pub struct HoikeBroadcastHandler { /* private fields */ }Expand description
BroadcastHandler that processes GossipMessage broadcasts.
Implementations§
Source§impl HoikeBroadcastHandler
impl HoikeBroadcastHandler
pub fn new(tx: Sender<GossipMessage>, verifier: Option<GossipVerifier>) -> Self
Trait Implementations§
Source§impl<T> BroadcastHandler<T> for HoikeBroadcastHandler
impl<T> BroadcastHandler<T> for HoikeBroadcastHandler
Source§type Key = BroadcastKey
type Key = BroadcastKey
A unique identifier for the broadcasts this handler manages Read more
Source§type Error = BroadcastError
type Error = BroadcastError
The error type that
receive_item may emit. Will be wrapped
by [crate::Error::CustomBroadcast].Source§fn receive_item(
&mut self,
data: &[u8],
_sender: Option<&T>,
) -> Result<Option<Self::Key>, Self::Error>
fn receive_item( &mut self, data: &[u8], _sender: Option<&T>, ) -> Result<Option<Self::Key>, Self::Error>
Decodes a [
Self::Key] from a buffer and either discards
it or tells Foca to persist and disseminate it. Read more§fn should_add_broadcast_data(&self, _member: &T) -> bool
fn should_add_broadcast_data(&self, _member: &T) -> bool
Decides whether Foca should add broadcast data to the message
it’s about to send to active member
T. Read moreAuto Trait Implementations§
impl Freeze for HoikeBroadcastHandler
impl RefUnwindSafe for HoikeBroadcastHandler
impl Send for HoikeBroadcastHandler
impl Sync for HoikeBroadcastHandler
impl Unpin for HoikeBroadcastHandler
impl UnsafeUnpin for HoikeBroadcastHandler
impl UnwindSafe for HoikeBroadcastHandler
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