pub struct FoldContext {
pub as_of: DateTime<Utc>,
pub correlation_id: Option<Uuid>,
pub extra: SharedJson,
}Expand description
Context for fold operations.
The context parameterizes fold behavior — same entries with different contexts may produce different derived states.
Fields§
§as_of: DateTime<Utc>Point in time to evaluate (for temporal queries)
correlation_id: Option<Uuid>Correlation ID for tracing
extra: SharedJsonAdditional context as shared JSON.
Uses SharedJson (Arc-backed) so clones are cheap in hot paths.
Implementations§
Source§impl FoldContext
impl FoldContext
Sourcepub fn with_correlation_id(self, id: Uuid) -> Self
pub fn with_correlation_id(self, id: Uuid) -> Self
Set the correlation ID.
Sourcepub fn with_extra(self, extra: impl Into<SharedJson>) -> Self
pub fn with_extra(self, extra: impl Into<SharedJson>) -> Self
Set extra context.
Trait Implementations§
Source§impl Clone for FoldContext
impl Clone for FoldContext
Source§fn clone(&self) -> FoldContext
fn clone(&self) -> FoldContext
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 moreSource§impl Debug for FoldContext
impl Debug for FoldContext
Source§impl Default for FoldContext
impl Default for FoldContext
Source§impl<'de> Deserialize<'de> for FoldContext
impl<'de> Deserialize<'de> for FoldContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FoldContext
impl RefUnwindSafe for FoldContext
impl Send for FoldContext
impl Sync for FoldContext
impl Unpin for FoldContext
impl UnsafeUnpin for FoldContext
impl UnwindSafe for FoldContext
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