[−][src]Struct eventstore::types::StreamMetadataBuilder
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 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]
self,
key: String,
value: V
) -> StreamMetadataBuilder where
V: Serialize,
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]
fn default() -> StreamMetadataBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for StreamMetadataBuilder
impl Send for StreamMetadataBuilder
impl Sync for StreamMetadataBuilder
impl Unpin for StreamMetadataBuilder
impl UnwindSafe for StreamMetadataBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,