pub struct CheckpointSender {
pub tx: Sender<CheckpointRequest>,
}Expand description
Handle for sending checkpoint requests to the batcher.
Fields§
§tx: Sender<CheckpointRequest>Channel for sending requests to the batcher
Implementations§
Source§impl CheckpointSender
impl CheckpointSender
Sourcepub fn new(tx: Sender<CheckpointRequest>) -> Self
pub fn new(tx: Sender<CheckpointRequest>) -> Self
Creates a new CheckpointSender.
Sourcepub async fn checkpoint_sync(
&self,
operation: OperationUpdate,
) -> Result<(), DurableError>
pub async fn checkpoint_sync( &self, operation: OperationUpdate, ) -> Result<(), DurableError>
Sends a synchronous checkpoint request and waits for completion.
This method blocks until the checkpoint is confirmed or fails.
Sourcepub async fn checkpoint_async(
&self,
operation: OperationUpdate,
) -> Result<(), DurableError>
pub async fn checkpoint_async( &self, operation: OperationUpdate, ) -> Result<(), DurableError>
Sends an asynchronous checkpoint request (fire-and-forget).
This method returns immediately without waiting for confirmation.
Sourcepub async fn checkpoint(
&self,
operation: OperationUpdate,
is_sync: bool,
) -> Result<(), DurableError>
pub async fn checkpoint( &self, operation: OperationUpdate, is_sync: bool, ) -> Result<(), DurableError>
Sends a checkpoint request with configurable sync/async behavior.
Trait Implementations§
Source§impl Clone for CheckpointSender
impl Clone for CheckpointSender
Source§fn clone(&self) -> CheckpointSender
fn clone(&self) -> CheckpointSender
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CheckpointSender
impl RefUnwindSafe for CheckpointSender
impl Send for CheckpointSender
impl Sync for CheckpointSender
impl Unpin for CheckpointSender
impl UnsafeUnpin for CheckpointSender
impl UnwindSafe for CheckpointSender
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.