[][src]Struct eventstore::StreamMetadataBuilder

pub struct StreamMetadataBuilder { /* fields omitted */ }

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

Implementations

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 a sliding window based on the number of items in the stream. When data reaches a certain length it disappears automatically from the stream and is considered eligible for scavenging.

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

Sets a sliding window based on dates. When data reaches a certain age it disappears automatically from the stream and is considered eligible for scavenging.

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]

This controls the cache of the head of a stream. Most URIs in a stream are infinitely cacheable but the head by default will not cache. It may be preferable in some situations to set a small amount of caching on the head to allow intermediaries to handle polls (say 10 seconds).

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> Any for T where
    T: 'static + ?Sized
[src]

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> IntoRequest<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]