pub struct EventIncludeCtx {
pub pool: Pool,
pub rls_tenant: Option<String>,
pub schema_override: Option<String>,
pub dialect: Arc<dyn Dialect>,
pub entity: ResolvedEntity,
pub resolved: Vec<(String, IncludeSpec, ResolvedEntity)>,
pub pk_column: String,
pub pk_value: String,
}Expand description
Everything the publish task needs to re-read the row with its related entities expanded.
Owned rather than borrowed: the fetch happens inside the detached task, after the handler’s executor (and any RLS transaction) is gone.
Fields§
§pool: Pool§rls_tenant: Option<String>Some(tenant) for RLS-strategy tenants — a fresh transaction with SET LOCAL is opened
for the fetch. None for database-strategy tenants.
schema_override: Option<String>§dialect: Arc<dyn Dialect>§entity: ResolvedEntity§resolved: Vec<(String, IncludeSpec, ResolvedEntity)>Every include named by any trigger on this entity, already resolved. Each trigger picks its own subset by name.
pk_column: String§pk_value: StringPrimary-key value of the affected row, rendered for an RSQL == leaf.
Implementations§
Source§impl EventIncludeCtx
impl EventIncludeCtx
Sourcepub fn with_pk_value(&self, pk_value: String) -> Self
pub fn with_pk_value(&self, pk_value: String) -> Self
Same resolution pointed at a different row. Bulk paths publish one event per row but resolve the include set once for the whole batch — only the pk differs.
Trait Implementations§
Source§impl Clone for EventIncludeCtx
impl Clone for EventIncludeCtx
Source§fn clone(&self) -> EventIncludeCtx
fn clone(&self) -> EventIncludeCtx
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for EventIncludeCtx
impl !UnwindSafe for EventIncludeCtx
impl Freeze for EventIncludeCtx
impl Send for EventIncludeCtx
impl Sync for EventIncludeCtx
impl Unpin for EventIncludeCtx
impl UnsafeUnpin for EventIncludeCtx
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,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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