pub trait SyncTransport {
// Required methods
fn send_heartbeat(&mut self, heartbeat: HeartbeatMessage) -> SyncResult<()>;
fn send_payload(
&mut self,
peer: &PeerInfo,
payload: Vec<u8>,
) -> SyncResult<()>;
}Expand description
Sync transport contract.
Required Methods§
Sourcefn send_heartbeat(&mut self, heartbeat: HeartbeatMessage) -> SyncResult<()>
fn send_heartbeat(&mut self, heartbeat: HeartbeatMessage) -> SyncResult<()>
Sends an operational heartbeat.
Sourcefn send_payload(&mut self, peer: &PeerInfo, payload: Vec<u8>) -> SyncResult<()>
fn send_payload(&mut self, peer: &PeerInfo, payload: Vec<u8>) -> SyncResult<()>
Sends opaque payload bytes to a compatible peer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".