Trait WriteToStream

Source
pub trait WriteToStream {
    // Required method
    fn write_to_stream(
        &mut self,
        stream_name: &str,
        expected_version: StreamVersion,
        messages: &[Message],
    ) -> WriteResult;
}
Expand description

A trait that expresses the behaviour of writing to a stream

Required Methods§

Source

fn write_to_stream( &mut self, stream_name: &str, expected_version: StreamVersion, messages: &[Message], ) -> WriteResult

Write events to a stream.

§Arguments
  • stream_name - The stream to write to.
  • expected_version - The expected version of the stream at write time, used for Optimistic. Concurrency Control.
  • messages - A slice of messages to write into the stream.

Implementors§