Skip to main content

PeerTransport

Trait PeerTransport 

pub trait PeerTransport {
    // Required methods
    fn is_connected(&self) -> bool;
    fn send(&mut self, request: CollabRequest) -> Result<(), String>;
    fn poll(&mut self) -> Vec<CollabEvent>;

    // Provided methods
    fn take_primary_route_result(&mut self) -> Option<Result<RouteSpec, String>> { ... }
    fn join_route(&mut self, _: RouteSpec) -> Result<(), String> { ... }
    fn send_to_route(
        &mut self,
        _: RouteSpec,
        _: CollabRequest,
    ) -> Result<(), String> { ... }
    fn publish_action_directory(&mut self, _: String) -> Result<(), String> { ... }
    fn take_action_directory_requests(&mut self) -> Vec<ActionDirectoryRequest> { ... }
    fn install_document_encryption(
        &mut self,
        _: RouteSpec,
        _: ChannelGroup,
    ) -> Result<(), String> { ... }
}
Expand description

Transport adapters must authenticate ordinary peer joins and verify inbound envelopes before publishing events. Installing this adapter grants no model, action, HostContext, or storage authority. Queue failures are fail-closed.

Required Methods§

fn is_connected(&self) -> bool

fn send(&mut self, request: CollabRequest) -> Result<(), String>

fn poll(&mut self) -> Vec<CollabEvent>

Provided Methods§

fn take_primary_route_result(&mut self) -> Option<Result<RouteSpec, String>>

The real broker acknowledgement of the latest Hello, never an optimistic echo.

fn join_route(&mut self, _: RouteSpec) -> Result<(), String>

fn send_to_route( &mut self, _: RouteSpec, _: CollabRequest, ) -> Result<(), String>

fn publish_action_directory(&mut self, _: String) -> Result<(), String>

fn take_action_directory_requests(&mut self) -> Vec<ActionDirectoryRequest>

fn install_document_encryption( &mut self, _: RouteSpec, _: ChannelGroup, ) -> Result<(), String>

Implementors§