Skip to main content

ViolationKind

Enum ViolationKind 

Source
pub enum ViolationKind {
Show 21 variants EmptyChart, MissingId, DuplicateStateId { id: String, }, UnknownTarget { target: String, }, IllegalInitialTarget { target: String, }, InitialAttributeAndElement, InitialOnNonCompound, IllegalInitialTransition, HistoryTransitionCount, IllegalHistoryTransition, IllegalHistoryTarget { target: String, }, HistoryAtRoot, HistoryContent, FinalContent { what: String, }, DoneDataOutsideFinal, ParallelHistoryOnly, StateHistoryOnly, IllegalTargetSet { first: String, second: String, }, HistoryDefaultCycle { history: String, }, DuplicateDataId { id: String, }, ConflictingAttributes { element: String, attributes: String, },
}
Expand description

What is wrong.

Variants§

§

EmptyChart

The chart has no child states.

§

MissingId

A state has no identifier (run crate::identity::assign_generated_ids first).

§

DuplicateStateId

Two states share an identifier.

Fields

§id: String

The repeated identifier.

§

UnknownTarget

A target names no state.

Fields

§target: String

The unknown identifier.

§

IllegalInitialTarget

An initial attribute or <initial> transition targets a state that is not a proper descendant of the owning state.

Fields

§target: String

The offending target.

§

InitialAttributeAndElement

A state has both an initial attribute and an <initial> element.

§

InitialOnNonCompound

An initial attribute or <initial> element on a state that is not compound.

§

IllegalInitialTransition

An <initial> transition with an event or a condition, or without a target.

§

HistoryTransitionCount

A history state with more than one transition.

§

IllegalHistoryTransition

A history default transition with an event or a condition, or without a target.

§

IllegalHistoryTarget

A history default transition target outside the history’s parent.

Fields

§target: String

The offending target.

§

HistoryAtRoot

A history state that is a child of the root.

§

HistoryContent

A history state with content other than its default transition.

§

FinalContent

A final state with content other than onentry, onexit and donedata.

Fields

§what: String

What it contains.

§

DoneDataOutsideFinal

donedata on a state that is not final.

§

ParallelHistoryOnly

A parallel state whose children are all history states.

§

StateHistoryOnly

A <state> whose children are all history states.

§

IllegalTargetSet

The targets of one transition cannot be active together.

Fields

§first: String

The first target of the conflicting pair.

§second: String

The second target of the conflicting pair.

§

HistoryDefaultCycle

Default history entry never reaches a real state: following the default transitions of history states (a history state without one defaults to its parent’s initial) leads back to this history state, for example <state initial="h"> whose history child h has no default transition.

Fields

§history: String

The history state on the cycle.

§

DuplicateDataId

Two data items share an identifier.

Fields

§id: String

The repeated identifier.

§

ConflictingAttributes

An element has attributes or children that exclude each other, or lacks a required one.

Fields

§element: String

The element name.

§attributes: String

The attributes involved.

Trait Implementations§

Source§

impl Clone for ViolationKind

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 ViolationKind

Source§

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

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

impl Eq for ViolationKind

Source§

impl PartialEq for ViolationKind

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 ViolationKind

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> 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.