pub enum WriterCommand<W = TcpWriter> {
Update(W, Sender<bool>),
UpdateWithReplay(W, Vec<Bytes>, Sender<bool>),
Send(Bytes),
SendOrReplay {
key: u64,
data: Bytes,
},
}Expand description
A command processed by the socket writer task.
Variants§
Update(W, Sender<bool>)
Replaces the writer after reconnection and reports whether buffered messages were drained.
UpdateWithReplay(W, Vec<Bytes>, Sender<bool>)
Replaces the writer, sends reconnect replay first, then drains buffered messages.
Send(Bytes)
Sends data to the server.
SendOrReplay
Sends data once, either directly or through reconnect replay.
A newer buffered command with the same key supersedes an older one. If reconnect replay already contains the exact data, the buffered command is discarded after replay.
Trait Implementations§
Auto Trait Implementations§
impl<W = WriteHalf<MaybeTlsStream<TcpStream>>> !Freeze for WriterCommand<W>
impl<W = WriteHalf<MaybeTlsStream<TcpStream>>> !RefUnwindSafe for WriterCommand<W>
impl<W = WriteHalf<MaybeTlsStream<TcpStream>>> !UnwindSafe for WriterCommand<W>
impl<W> Send for WriterCommand<W>where
W: Send,
impl<W> Sync for WriterCommand<W>where
W: Sync,
impl<W> Unpin for WriterCommand<W>where
W: Unpin,
impl<W> UnsafeUnpin for WriterCommand<W>where
W: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more