Struct eventstore_tcp::builder::ReadStreamEventsBuilder [] [src]

pub struct ReadStreamEventsBuilder { /* fields omitted */ }

Builds a package for reading multiple events from a stream in either ReadDirection.

Example

use eventstore_tcp::{Builder, ReadDirection, StreamVersion};

let package = Builder::read_stream_events()
    .direction(ReadDirection::Forward)
    .stream_id("my_stream-1")
    .from_event_number(StreamVersion::from(42))
    .max_count(10)
    .resolve_link_tos(true) // default
    .require_master(false)  // default
    .build_package(None, None);

Methods

impl ReadStreamEventsBuilder
[src]

Set the read direction (required).

Sets the maximum number of events to read (required). Panics if argument is zero. u8 is used as larger batches should be paged. At the moment maximum buffer requirement even for 255 events is 255*16MiB > 4000MB.

Panics if the id is an empty string

Event number to read from to the given direction.

Whether or not the server should resolve links found in the stream to events of other streams. Defaults to true.

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.

Build a package. Will panic if required values are not set. Values of this builder will be moved into the package.