Struct eventstore_tcp::builder::ReadEventBuilder
[−]
[src]
pub struct ReadEventBuilder { /* fields omitted */ }
Builder for a single event read request ReadEvent
.
Example
use eventstore_tcp::{Builder, StreamVersion}; let package = Builder::read_event() .stream_id("my_stream-1") .event_number(StreamVersion::from(42)) .resolve_link_tos(true) // default .require_master(false) // default .build_package(None, None);
Methods
impl ReadEventBuilder
[src]
fn stream_id<S: Into<Cow<'static, str>>>(&mut self, id: S) -> &mut Self
Panics if the id is an empty string
fn event_number<N: Into<EventNumber>>(&mut self, number: N) -> &mut Self
Event number to be read.
fn resolve_link_tos(&mut self, resolve: bool) -> &mut Self
Whether or not the server should resolve links found in the stream to events of other
streams. Defaults to true
.
fn require_master(&mut self, require: bool) -> &mut Self
Should the server only handle the request if it is the cluster master. Note that while only the master server can accept writes, other cluster members can forward requests to the master.
Defaults to false
.
fn build_package(&mut self,
authentication: Option<UsernamePassword>,
correlation_id: Option<Uuid>)
-> Package
authentication: Option<UsernamePassword>,
correlation_id: Option<Uuid>)
-> Package
Build a package. Will panic if required values are not set. Values of this builder will be moved into the package.