Skip to main content

CeremonyDefinitionDraft

Struct CeremonyDefinitionDraft 

Source
pub struct CeremonyDefinitionDraft { /* private fields */ }

Implementations§

Source§

impl CeremonyDefinitionDraft

Source

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.

Source

pub fn with_max_parallel(self, max_parallel: MaxParallel) -> Self

Source

pub fn max_parallel(&self) -> MaxParallel

Source

pub const fn with_max_transitions(self, max_transitions: MaxTransitions) -> Self

Source

pub const fn with_max_bounces(self, max_bounces: MaxBounces) -> Self

Source

pub const fn max_transitions(&self) -> Option<MaxTransitions>

Source

pub const fn max_bounces(&self) -> Option<MaxBounces>

Source

pub const fn with_ceremony_timeout(self, timeout: CeremonyTimeout) -> Self

Source

pub const fn with_state_timeout(self, timeout: StateTimeout) -> Self

Source

pub const fn ceremony_timeout(&self) -> Option<CeremonyTimeout>

Source

pub const fn state_timeout(&self) -> Option<StateTimeout>

Source

pub fn name(&self) -> &CeremonyName

Source

pub fn version(&self) -> &CeremonyVersion

Source

pub fn description(&self) -> Option<&CeremonyDescription>

Source

pub fn inputs(&self) -> &[CeremonyInputDefinition]

Source

pub fn outputs(&self) -> &[CeremonyOutputDefinition]

Source

pub fn states(&self) -> &[CeremonyState]

Source

pub fn transitions(&self) -> &[CeremonyTransition]

Source

pub fn steps(&self) -> &[CeremonyStep]

Source

pub fn guards(&self) -> &[CeremonyGuard]

Source

pub fn roles(&self) -> &[CeremonyRole]

Source

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.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CeremonyDefinitionDraft

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CeremonyDefinitionDraft

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CeremonyDefinitionDraft

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.