pub struct ProjectionContext<'i> {
pub tick: Tick,
pub instance_id: InstanceId,
pub manifest: Option<&'i ManifestSnapshot>,
/* private fields */
}Expand description
Per-dispatch context carried alongside an EventRecord. The 'i
lifetime reserves the slot that binds to the L0
Effect<'i, Authorized> borrow, and also scopes the optional manifest
snapshot reference.
Fields§
§tick: TickTick at which the event is being applied.
instance_id: InstanceIdRuntime instance identifier.
manifest: Option<&'i ManifestSnapshot>Active manifest snapshot, if one has been loaded. None is legal
for Tier-0 dev bootstrap paths that run before the first manifest
has been emitted via RuntimeBootstrap.
Implementations§
Source§impl<'i> ProjectionContext<'i>
impl<'i> ProjectionContext<'i>
Sourcepub fn new(tick: Tick, instance_id: InstanceId) -> Self
pub fn new(tick: Tick, instance_id: InstanceId) -> Self
Construct a projection dispatch context without a manifest.
Sourcepub fn with_manifest(
tick: Tick,
instance_id: InstanceId,
manifest: &'i ManifestSnapshot,
) -> Self
pub fn with_manifest( tick: Tick, instance_id: InstanceId, manifest: &'i ManifestSnapshot, ) -> Self
Construct a projection dispatch context with an attached manifest snapshot. Callers that have loaded a manifest should use this path so projection workers can key on shell policy (tier, cipher, etc.).
Auto Trait Implementations§
impl<'i> Freeze for ProjectionContext<'i>
impl<'i> RefUnwindSafe for ProjectionContext<'i>
impl<'i> Send for ProjectionContext<'i>
impl<'i> Sync for ProjectionContext<'i>
impl<'i> Unpin for ProjectionContext<'i>
impl<'i> UnsafeUnpin for ProjectionContext<'i>
impl<'i> UnwindSafe for ProjectionContext<'i>
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