pub struct IsolatedOp<'inv> { /* private fields */ }Expand description
An op holding exactly this event’s work, fenced from the batch history.
Implements AtomicOperation. The only exit
is commit — isolation from future events is guaranteed
by construction, and (as with BatchOp) no mutable access to the raw
es_entity::DbOp exists, so the op can only land through the runner.
Implementations§
Trait Implementations§
Source§impl AtomicOperation for IsolatedOp<'_>
Full delegation to the inner es_entity::DbOp — see the notes on
BatchOp’s impl for why every provided method is delegated too, and why
this is deliberately the only mutable surface (no DerefMut).
impl AtomicOperation for IsolatedOp<'_>
Full delegation to the inner es_entity::DbOp — see the notes on
BatchOp’s impl for why every provided method is delegated too, and why
this is deliberately the only mutable surface (no DerefMut).
Source§fn maybe_now(&self) -> Option<DateTime<Utc>>
fn maybe_now(&self) -> Option<DateTime<Utc>>
Function for querying when the operation is taking place - if it is cached.
Source§fn clock(&self) -> &ClockHandle
fn clock(&self) -> &ClockHandle
Returns the clock handle for time operations. Read more
Source§fn connection(&mut self) -> &mut Connection
fn connection(&mut self) -> &mut Connection
Returns the raw underlying connection.
The desired way to represent this would actually be as a GAT: Read more
Source§fn as_executor(&mut self) -> OneTimeExecutor<'_, &mut Connection>
fn as_executor(&mut self) -> OneTimeExecutor<'_, &mut Connection>
Returns the
sqlx::Executor implementation that statements should be
executed through. Read moreSource§fn add_commit_hook<H: CommitHook>(&mut self, hook: H) -> Result<(), H>
fn add_commit_hook<H: CommitHook>(&mut self, hook: H) -> Result<(), H>
Registers a commit hook that will run pre_commit before and post_commit after the transaction commits.
Returns Ok(()) if the hook was registered, Err(hook) if hooks are not supported.
Source§fn commit_hook<H: CommitHook>(&self) -> Option<&H>
fn commit_hook<H: CommitHook>(&self) -> Option<&H>
Typed shared access to the currently-accumulating commit hook of type
H,
if this operation supports commit hooks and one is registered.
Returns the hook a subsequent add_commit_hook::<H> call would merge into.Source§fn supports_hooks(&self) -> bool
fn supports_hooks(&self) -> bool
Whether this operation supports commit hooks. Read more
Auto Trait Implementations§
impl<'inv> !RefUnwindSafe for IsolatedOp<'inv>
impl<'inv> !Sync for IsolatedOp<'inv>
impl<'inv> !UnwindSafe for IsolatedOp<'inv>
impl<'inv> Freeze for IsolatedOp<'inv>
impl<'inv> Send for IsolatedOp<'inv>
impl<'inv> Unpin for IsolatedOp<'inv>
impl<'inv> UnsafeUnpin for IsolatedOp<'inv>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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