SpaceHandler

Trait SpaceHandler 

Source
pub trait SpaceHandler:
    'static
    + Send
    + Sync
    + Debug {
    // Provided method
    fn recv_notify(
        &self,
        from_peer: Url,
        space_id: SpaceId,
        data: Bytes,
    ) -> K2Result<()> { ... }
}
Expand description

Handler for events coming out of Kitsune2 such as messages from peers.

Provided Methods§

Source

fn recv_notify( &self, from_peer: Url, space_id: SpaceId, data: Bytes, ) -> K2Result<()>

The sync handler for receiving notifications sent by a remote peer in reference to a particular space. If this callback returns an error, then the connection which sent the message will be closed.

Implementors§