[][src]Struct eventstore::StreamMetadata

pub struct StreamMetadata {
    pub max_count: Option<u64>,
    pub max_age: Option<Duration>,
    pub truncate_before: Option<u64>,
    pub cache_control: Option<Duration>,
    pub acl: StreamAcl,
    pub custom_properties: HashMap<String, Value>,
}

Represents stream metadata with strongly types properties for system values and a dictionary-like interface for custom values.

Fields

max_count: Option<u64>

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.

max_age: Option<Duration>

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

truncate_before: Option<u64>

The event number from which previous events can be scavenged. This is used to implement soft-deletion of streams.

cache_control: Option<Duration>

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).

acl: StreamAcl

The access control list for the stream.

custom_properties: HashMap<String, Value>

An enumerable of key-value pairs of keys to JSON value for user-provided metadata.

Implementations

impl StreamMetadata[src]

pub fn builder() -> StreamMetadataBuilder[src]

Initializes a fresh stream metadata builder.

Trait Implementations

impl Clone for StreamMetadata[src]

impl Debug for StreamMetadata[src]

impl Default for StreamMetadata[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]