Struct persist::client::MultiWriteHandle [−][src]
pub struct MultiWriteHandle {
stream_ids: HashSet<Id>,
client: Result<RuntimeClient, Error>,
}
Expand description
A handle for writing to multiple streams.
Fields
stream_ids: HashSet<Id>
client: Result<RuntimeClient, Error>
Implementations
Returns Some(Error)
in case any initialization operation on this MultiWriteHandle
resulted in an Error
.
Returns a new MultiWriteHandle for the given stream.
pub fn new_from_streams<K, V, H, I>(handles: I) -> Result<Self, Error> where
K: Codec,
V: Codec,
H: Borrow<StreamWriteHandle<K, V>>,
I: Iterator<Item = H>,
pub fn new_from_streams<K, V, H, I>(handles: I) -> Result<Self, Error> where
K: Codec,
V: Codec,
H: Borrow<StreamWriteHandle<K, V>>,
I: Iterator<Item = H>,
Returns a new MultiWriteHandle for the given streams.
Convenience function for when all the streams have matching K and V.
NOTE: This only returns an Error
in case the passed iterator contains no handles or when
passing in handles from different persist runtimes. All other errors are handled
internally.
pub fn add_stream<K: Codec, V: Codec>(
&mut self,
handle: &StreamWriteHandle<K, V>
) -> Result<(), Error>
pub fn add_stream<K: Codec, V: Codec>(
&mut self,
handle: &StreamWriteHandle<K, V>
) -> Result<(), Error>
Adds the given stream to the set
NOTE: This only returns an Error
when passing in handles from different persist runtimes.
All other errors are handled internally.
Atomically writes the given updates to the paired streams.
Either all of the writes will be made durable for replay or none of them will.
Closes the streams at the given timestamp, migrating data strictly less than it into the trace.
Ids may not be duplicated (this is equivalent to sealing the stream twice at the same timestamp, which we currently disallow).
Closes all contained streams at the given timestamp, migrating data strictly less than it into the trace.
Unblocks compaction for updates for the given streams at the paired
since
timestamp.
Ids may not be duplicated (this is equivalent to allowing compaction on the stream twice at the same timestamp, which we currently disallow).
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MultiWriteHandle
impl Send for MultiWriteHandle
impl Sync for MultiWriteHandle
impl Unpin for MultiWriteHandle
impl !UnwindSafe for MultiWriteHandle
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