pub struct ReplicationSender { /* private fields */ }Expand description
Replication sender state machine.
Implementations§
Source§impl ReplicationSender
impl ReplicationSender
Sourcepub const fn state(&self) -> SenderState
pub const fn state(&self) -> SenderState
Current state.
Sourcepub fn prepare(
&mut self,
page_size: u32,
pages: &mut [PageEntry],
config: SenderConfig,
) -> Result<()>
pub fn prepare( &mut self, page_size: u32, pages: &mut [PageEntry], config: SenderConfig, ) -> Result<()>
Transition from IDLE to ENCODING: prepare a changeset for streaming.
§Errors
Returns error if not in IDLE state, pages are empty, or symbol size invalid.
Sourcepub fn start_streaming(&mut self) -> Result<()>
pub fn start_streaming(&mut self) -> Result<()>
Sourcepub fn next_packet(&mut self) -> Result<Option<ReplicationPacket>>
pub fn next_packet(&mut self) -> Result<Option<ReplicationPacket>>
Generate the next replication packet in the stream.
Returns None when all shards have been fully streamed (ISI limit reached).
§Errors
Returns error if not in STREAMING state.
Sourcepub fn acknowledge_complete(&mut self) -> Result<()>
pub fn acknowledge_complete(&mut self) -> Result<()>
Acknowledge completion from receiver: stop streaming and transition to COMPLETE.
§Errors
Returns error if not in STREAMING state.
Trait Implementations§
Source§impl Debug for ReplicationSender
impl Debug for ReplicationSender
Auto Trait Implementations§
impl Freeze for ReplicationSender
impl RefUnwindSafe for ReplicationSender
impl Send for ReplicationSender
impl Sync for ReplicationSender
impl Unpin for ReplicationSender
impl UnsafeUnpin for ReplicationSender
impl UnwindSafe for ReplicationSender
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).