Trait Message

Source
pub trait Message: Send {
    // Required methods
    fn stream_key(&self) -> StreamKey;
    fn shard_id(&self) -> ShardId;
    fn sequence(&self) -> SeqNo;
    fn timestamp(&self) -> Timestamp;
    fn message(&self) -> Payload<'_>;

    // Provided methods
    fn to_owned(&self) -> SharedMessage { ... }
    fn identifier(&self) -> (StreamKey, ShardId, SeqNo) { ... }
}
Expand description

Common interface of messages, to be implemented by all backends.

Required Methods§

Source

fn stream_key(&self) -> StreamKey

Source

fn shard_id(&self) -> ShardId

Source

fn sequence(&self) -> SeqNo

Source

fn timestamp(&self) -> Timestamp

Source

fn message(&self) -> Payload<'_>

Provided Methods§

Source

fn to_owned(&self) -> SharedMessage

Source

fn identifier(&self) -> (StreamKey, ShardId, SeqNo)

tuple to uniquely identify a message

Implementors§