pub struct Chains { /* private fields */ }Expand description
The itineraries a running factory is accounting against.
One per causal chain, created when the chain begins and reused by every flight within it.
Implementations§
Source§impl Chains
impl Chains
Sourcepub fn with<T>(
&self,
id: &ItineraryId,
defaults: &Defaults,
act: impl FnOnce(&mut Itinerary) -> T,
) -> Option<T>
pub fn with<T>( &self, id: &ItineraryId, defaults: &Defaults, act: impl FnOnce(&mut Itinerary) -> T, ) -> Option<T>
Runs act against the itinerary for id, creating it on first sight.
Creating on first sight rather than requiring registration means a queued flight from a previous process still lands in a chain with the configured rails, instead of being refused for belonging to an itinerary this process has never heard of.
Sourcepub fn opened_by(&self, id: &ItineraryId, pipeline: Option<&PipelineName>)
pub fn opened_by(&self, id: &ItineraryId, pipeline: Option<&PipelineName>)
Remembers which pipeline opened a chain.
Only the first flight of a chain carries one, so this is recorded once and read by every run after it.
Sourcepub fn pipeline_of(&self, id: &ItineraryId) -> Option<PipelineName>
pub fn pipeline_of(&self, id: &ItineraryId) -> Option<PipelineName>
Which pipeline a chain was triggered through, if it is known.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Chains
impl RefUnwindSafe for Chains
impl Send for Chains
impl Sync for Chains
impl Unpin for Chains
impl UnsafeUnpin for Chains
impl UnwindSafe for Chains
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