pub struct RepeatDefinition { /* private fields */ }Expand description
Canonical restart-relevant repeat declaration for one step.
Repeat declarations are metadata over one step execution. They do not add a graph edge and therefore cannot create a graph cycle. Nested repeats form a single wrapper chain; runtime iteration is deliberately owned by #301.
Implementations§
Source§impl RepeatDefinition
impl RepeatDefinition
Sourcepub fn new(
id: RepeatId,
policy: RepeatPolicyDefinition,
interceptors: Vec<RepeatInterceptorDefinition>,
state: RepeatStateSchema,
) -> Result<Self, RepeatDefinitionError>
pub fn new( id: RepeatId, policy: RepeatPolicyDefinition, interceptors: Vec<RepeatInterceptorDefinition>, state: RepeatStateSchema, ) -> Result<Self, RepeatDefinitionError>
Constructs one bounded repeat declaration.
§Errors
Rejects more than 32 interceptors or duplicate interceptor IDs.
Sourcepub fn with_nested(
self,
nested: RepeatDefinition,
) -> Result<Self, RepeatDefinitionError>
pub fn with_nested( self, nested: RepeatDefinition, ) -> Result<Self, RepeatDefinitionError>
Wraps one nested repeat declaration.
§Errors
Rejects nesting deeper than 8 or reuse of this repeat ID anywhere in the nested chain.
Sourcepub const fn policy(&self) -> &RepeatPolicyDefinition
pub const fn policy(&self) -> &RepeatPolicyDefinition
Borrows the restart-relevant policy declaration.
Sourcepub fn interceptors(&self) -> &[RepeatInterceptorDefinition]
pub fn interceptors(&self) -> &[RepeatInterceptorDefinition]
Borrows interceptors in semantic before-order.
Sourcepub const fn state_schema(&self) -> &RepeatStateSchema
pub const fn state_schema(&self) -> &RepeatStateSchema
Borrows the durable state-schema identity.
Sourcepub fn nested(&self) -> Option<&RepeatDefinition>
pub fn nested(&self) -> Option<&RepeatDefinition>
Borrows the nested repeat wrapper, when present.
Sourcepub const fn nesting_depth(&self) -> usize
pub const fn nesting_depth(&self) -> usize
Returns the complete wrapper-chain depth.
Trait Implementations§
Source§impl Clone for RepeatDefinition
impl Clone for RepeatDefinition
Source§impl Debug for RepeatDefinition
impl Debug for RepeatDefinition
impl Eq for RepeatDefinition
Source§impl PartialEq for RepeatDefinition
impl PartialEq for RepeatDefinition
impl StructuralPartialEq for RepeatDefinition
Auto Trait Implementations§
impl Forget for RepeatDefinition
impl Freeze for RepeatDefinition
impl Move for RepeatDefinition
impl RefUnwindSafe for RepeatDefinition
impl Send for RepeatDefinition
impl Sync for RepeatDefinition
impl Unpin for RepeatDefinition
impl UnsafeUnpin for RepeatDefinition
impl UnwindSafe for RepeatDefinition
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