Struct persist::client::StreamWriteHandle[][src]

pub struct StreamWriteHandle<K, V> {
    name: String,
    stream_id: Result<Id, Error>,
    client: RuntimeClient,
    _phantom: PhantomData<(K, V)>,
}
Expand description

A handle that allows writes of ((Key, Value), Time, Diff) updates into an crate::indexed::Indexed via a RuntimeClient.

Fields

name: Stringstream_id: Result<Id, Error>client: RuntimeClient_phantom: PhantomData<(K, V)>

Implementations

Returns the external stream name for this handle.

Returns the internal stream Id for this handle.

Asynchronously persists (Key, Value, Time, Diff) updates.

Closes the stream at the given timestamp, migrating data strictly less than it into the trace.

Unblocks compaction for updates at or before since.

The compaction frontier can never decrease and it is an error to call this function with a since argument that is less than the current compaction frontier.

While it may seem counter-intuitive to advance the compaction frontier past the seal frontier, this is perfectly valid. It can happen when joining updates from one stream to updates from another stream, and we already know that the other stream is compacted further along. Allowing compaction on this, the first stream, then is saying that we are fine with losing historical detail, and that we already allow compaction of updates that are yet to come because we don’t need them at their full resolution. A similar case is when we know that any outstanding queries have an as_of that is in the future of the seal: we can also pro-actively allow compaction of updates that did not yet arrive.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Upcasts this ProgressEventTimestamp to Any. Read more

Returns the name of the concrete type of this object. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more