pub struct WriteContext<'a> { /* private fields */ }Expand description
Borrowed call state for a writer.
Implementations§
Source§impl<'a> WriteContext<'a>
impl<'a> WriteContext<'a>
Sourcepub const fn non_transactional(stop: &'a StopToken) -> Self
pub const fn non_transactional(stop: &'a StopToken) -> Self
Constructs a non-enlisted writer call scope.
Sourcepub fn enlisted(
stop: &'a StopToken,
transaction: &'a mut dyn BusinessTransaction,
) -> Self
pub fn enlisted( stop: &'a StopToken, transaction: &'a mut dyn BusinessTransaction, ) -> Self
Constructs a writer call enlisted in an OxideBatch-owned transaction.
Sourcepub const fn stop_token(&self) -> &'a StopToken
pub const fn stop_token(&self) -> &'a StopToken
Borrows the cooperative stop token.
Sourcepub fn transaction(&mut self) -> Option<&mut (dyn BusinessTransaction + 'a)>
pub fn transaction(&mut self) -> Option<&mut (dyn BusinessTransaction + 'a)>
Reborrows the enlisted transaction when one is present.
Sourcepub const fn is_enlisted(&self) -> bool
pub const fn is_enlisted(&self) -> bool
Returns whether this call participates in the chunk transaction.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WriteContext<'a>
impl<'a> !Sync for WriteContext<'a>
impl<'a> !UnwindSafe for WriteContext<'a>
impl<'a> Freeze for WriteContext<'a>
impl<'a> Send for WriteContext<'a>
impl<'a> Unpin for WriteContext<'a>
impl<'a> UnsafeUnpin for WriteContext<'a>
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 more