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: String
stream_id: Result<Id, Error>
client: RuntimeClient
_phantom: PhantomData<(K, V)>
Implementations
Returns the external stream name 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
Auto Trait Implementations
impl<K, V> !RefUnwindSafe for StreamWriteHandle<K, V>
impl<K, V> Send for StreamWriteHandle<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for StreamWriteHandle<K, V> where
K: Sync,
V: Sync,
impl<K, V> Unpin for StreamWriteHandle<K, V> where
K: Unpin,
V: Unpin,
impl<K, V> !UnwindSafe for StreamWriteHandle<K, V>
Blanket Implementations
Mutably borrows from an owned value. Read more
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