pub trait TransportBinding: BidiBinding{
type Cursor: Copy + Send + Debug + From<u64> + Into<u64> + 'static;
// Required methods
fn build_mutate(
adds: impl IntoIterator<Item = (Topic, Self::Cursor)>,
removes: impl IntoIterator<Item = Topic>,
mutate_id: u64,
) -> Self::Mutate;
fn group_topic(msg: &Self::GroupMessage) -> Option<Topic>;
fn welcome_topic(msg: &Self::WelcomeMessage) -> Option<Topic>;
fn group_cursor(msg: &Self::GroupMessage) -> Option<Self::Cursor>;
fn welcome_cursor(msg: &Self::WelcomeMessage) -> Option<Self::Cursor>;
fn group_envelope(msg: &Self::GroupMessage) -> &ServerEnvelope;
fn welcome_envelope(msg: &Self::WelcomeMessage) -> &ServerEnvelope;
fn advance(position: &mut Self::Cursor, delivered: Self::Cursor);
fn covers(position: &Self::Cursor, delivered: &Self::Cursor) -> bool;
fn meet(a: Self::Cursor, b: Self::Cursor) -> Self::Cursor;
}Expand description
Map backend envelopes to topics and positions for the lease ledger.
Required Associated Types§
Required Methods§
Sourcefn build_mutate(
adds: impl IntoIterator<Item = (Topic, Self::Cursor)>,
removes: impl IntoIterator<Item = Topic>,
mutate_id: u64,
) -> Self::Mutate
fn build_mutate( adds: impl IntoIterator<Item = (Topic, Self::Cursor)>, removes: impl IntoIterator<Item = Topic>, mutate_id: u64, ) -> Self::Mutate
Build an update with a nonzero ID. IDs increase on each connection.
fn group_topic(msg: &Self::GroupMessage) -> Option<Topic>
fn welcome_topic(msg: &Self::WelcomeMessage) -> Option<Topic>
fn group_cursor(msg: &Self::GroupMessage) -> Option<Self::Cursor>
fn welcome_cursor(msg: &Self::WelcomeMessage) -> Option<Self::Cursor>
fn group_envelope(msg: &Self::GroupMessage) -> &ServerEnvelope
fn welcome_envelope(msg: &Self::WelcomeMessage) -> &ServerEnvelope
fn advance(position: &mut Self::Cursor, delivered: Self::Cursor)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.