[][src]Struct eventstore::types::StreamMetadataBuilder

pub struct StreamMetadataBuilder { /* fields omitted */ }

Used to facilitate the creation of a stream's metadata.

Methods

impl StreamMetadataBuilder[src]

pub fn new() -> StreamMetadataBuilder[src]

Creates a StreamMetadata initialized with default values.

pub fn max_count(self, value: u64) -> StreamMetadataBuilder[src]

Sets the maximum number of events allowed in the stream.

pub fn max_age(self, value: Duration) -> StreamMetadataBuilder[src]

Sets the maximum age of events allowed in the stream.

pub fn truncate_before(self, value: u64) -> StreamMetadataBuilder[src]

Sets the event number from which previous events can be scavenged.

pub fn cache_control(self, value: Duration) -> StreamMetadataBuilder[src]

Sets the amount of time for which the stream head is cacheable.

pub fn acl(self, value: StreamAcl) -> StreamMetadataBuilder[src]

Sets the ACL of a stream.

pub fn insert_custom_property<V>(
    self,
    key: String,
    value: V
) -> StreamMetadataBuilder where
    V: Serialize
[src]

Adds user-defined property in the stream metadata.

pub fn build(self) -> StreamMetadata[src]

Returns a properly configured StreamMetaData.

Trait Implementations

impl Default for StreamMetadataBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T