pub struct CeremonyDefinitionDraft { /* private fields */ }Implementations§
Source§impl CeremonyDefinitionDraft
impl CeremonyDefinitionDraft
Sourcepub fn new(
name: CeremonyName,
version: CeremonyVersion,
description: Option<CeremonyDescription>,
inputs: impl IntoIterator<Item = CeremonyInputDefinition>,
outputs: impl IntoIterator<Item = CeremonyOutputDefinition>,
states: impl IntoIterator<Item = CeremonyState>,
transitions: impl IntoIterator<Item = CeremonyTransition>,
steps: impl IntoIterator<Item = CeremonyStep>,
guards: impl IntoIterator<Item = CeremonyGuard>,
roles: impl IntoIterator<Item = CeremonyRole>,
) -> Self
pub fn new( name: CeremonyName, version: CeremonyVersion, description: Option<CeremonyDescription>, inputs: impl IntoIterator<Item = CeremonyInputDefinition>, outputs: impl IntoIterator<Item = CeremonyOutputDefinition>, states: impl IntoIterator<Item = CeremonyState>, transitions: impl IntoIterator<Item = CeremonyTransition>, steps: impl IntoIterator<Item = CeremonyStep>, guards: impl IntoIterator<Item = CeremonyGuard>, roles: impl IntoIterator<Item = CeremonyRole>, ) -> Self
Accept the declarations as given.
Construction never fails: a draft exists in order to describe what is wrong with it.
pub fn with_max_parallel(self, max_parallel: MaxParallel) -> Self
pub fn max_parallel(&self) -> MaxParallel
pub const fn with_max_transitions(self, max_transitions: MaxTransitions) -> Self
pub const fn with_max_bounces(self, max_bounces: MaxBounces) -> Self
pub const fn max_transitions(&self) -> Option<MaxTransitions>
pub const fn max_bounces(&self) -> Option<MaxBounces>
pub const fn with_ceremony_timeout(self, timeout: CeremonyTimeout) -> Self
pub const fn with_state_timeout(self, timeout: StateTimeout) -> Self
pub const fn ceremony_timeout(&self) -> Option<CeremonyTimeout>
pub const fn state_timeout(&self) -> Option<StateTimeout>
pub fn name(&self) -> &CeremonyName
pub fn version(&self) -> &CeremonyVersion
pub fn description(&self) -> Option<&CeremonyDescription>
pub fn inputs(&self) -> &[CeremonyInputDefinition]
pub fn outputs(&self) -> &[CeremonyOutputDefinition]
pub fn states(&self) -> &[CeremonyState]
pub fn transitions(&self) -> &[CeremonyTransition]
pub fn steps(&self) -> &[CeremonyStep]
pub fn guards(&self) -> &[CeremonyGuard]
pub fn roles(&self) -> &[CeremonyRole]
Sourcepub fn analyze(&self) -> CeremonyValidationReport
pub fn analyze(&self) -> CeremonyValidationReport
Report every defect that would prevent publication.
Duplicate declarations are reported first, in the order
CeremonyDefinition::new assembles them, followed by the
structural analysis of the resulting state machine. Duplicates
do not stop the structural pass: an author fixing a draft wants
the whole picture, not the first obstacle.
Sourcepub fn publish(self) -> Result<CeremonyDefinition, DomainError>
pub fn publish(self) -> Result<CeremonyDefinition, DomainError>
Promote the draft into an always-valid definition.
Publication goes through CeremonyDefinition::new so there is
exactly one place where the invariants are enforced.
Trait Implementations§
Source§impl Clone for CeremonyDefinitionDraft
impl Clone for CeremonyDefinitionDraft
Source§impl Debug for CeremonyDefinitionDraft
impl Debug for CeremonyDefinitionDraft
Source§impl PartialEq for CeremonyDefinitionDraft
impl PartialEq for CeremonyDefinitionDraft
impl StructuralPartialEq for CeremonyDefinitionDraft
Auto Trait Implementations§
impl Freeze for CeremonyDefinitionDraft
impl RefUnwindSafe for CeremonyDefinitionDraft
impl Send for CeremonyDefinitionDraft
impl Sync for CeremonyDefinitionDraft
impl Unpin for CeremonyDefinitionDraft
impl UnsafeUnpin for CeremonyDefinitionDraft
impl UnwindSafe for CeremonyDefinitionDraft
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