Struct eventstore_tcp::builder::DeleteStreamBuilder
[−]
[src]
pub struct DeleteStreamBuilder { /* fields omitted */ }
Builder for DeleteStream
.
Example
use eventstore_tcp::{Builder, StreamVersion}; let package = Builder::delete_stream() .stream_id("hello_world") .expected_version(StreamVersion::from(42)) .require_master(false) // default .hard_delete(false) // default .build_package(None, None);
Methods
impl DeleteStreamBuilder
[src]
fn stream_id<S: Into<Cow<'static, str>>>(&mut self, id: S) -> &mut Self
Panics if the id is an empty string
fn expected_version<V: Into<ExpectedVersion>>(&mut self,
version: V)
-> &mut Self
version: V)
-> &mut Self
Sets the expected version of the stream as an optimistic locking mechanism.
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 hard_delete(&mut self, hard_delete: bool) -> &mut Self
Set to true
to actually delete data instead of just marking the stream as deleted.
Data may be deleted in the next scavenge operation.
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.