pub struct CheckpointRequest {
pub operation: OperationUpdate,
pub completion: Option<Sender<Result<(), DurableError>>>,
}Expand description
A request to checkpoint an operation.
This struct is sent through the checkpoint queue to the batcher. It includes an optional completion channel for synchronous checkpoints.
Fields§
§operation: OperationUpdateThe operation update to checkpoint
completion: Option<Sender<Result<(), DurableError>>>Optional channel to signal completion (for sync checkpoints)
Implementations§
Source§impl CheckpointRequest
impl CheckpointRequest
Sourcepub fn sync(
operation: OperationUpdate,
) -> (Self, Receiver<Result<(), DurableError>>)
pub fn sync( operation: OperationUpdate, ) -> (Self, Receiver<Result<(), DurableError>>)
Creates a new synchronous checkpoint request.
Returns the request and a receiver to wait for completion.
Sourcepub fn async_request(operation: OperationUpdate) -> Self
pub fn async_request(operation: OperationUpdate) -> Self
Creates a new asynchronous (fire-and-forget) checkpoint request.
Sourcepub fn estimated_size(&self) -> usize
pub fn estimated_size(&self) -> usize
Estimates the size of this request in bytes for batching.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CheckpointRequest
impl !RefUnwindSafe for CheckpointRequest
impl Send for CheckpointRequest
impl Sync for CheckpointRequest
impl Unpin for CheckpointRequest
impl UnsafeUnpin for CheckpointRequest
impl !UnwindSafe for CheckpointRequest
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> 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.