Skip to main content

StreamRefProtoEndpoint

Trait StreamRefProtoEndpoint 

Source
pub trait StreamRefProtoEndpoint:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn stream_ref_id(&self) -> StreamRefId;
    fn next_frame(&self) -> Option<StreamResult<StreamRefFrame>>;
    fn handle_frame(&self, frame: StreamRefFrame) -> StreamResult<()>;
    fn fail_connection(&self, error: StreamError);

    // Provided methods
    fn next_outbound(
        &self,
        max_data_elements: usize,
        _max_data_bytes: usize,
    ) -> Option<StreamResult<StreamRefOutbound>> { ... }
    fn handle_sequenced_on_next_batch(
        &self,
        stream_ref_id: StreamRefId,
        first_seq_nr: u64,
        payloads: &[&[u8]],
    ) -> StreamResult<()> { ... }
}
Expand description

Common interface for external carriers that pump protobuf frames.

Required Methods§

Provided Methods§

Source

fn next_outbound( &self, max_data_elements: usize, _max_data_bytes: usize, ) -> Option<StreamResult<StreamRefOutbound>>

Source

fn handle_sequenced_on_next_batch( &self, stream_ref_id: StreamRefId, first_seq_nr: u64, payloads: &[&[u8]], ) -> StreamResult<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§