pub struct LogicError {
    pub id: u32,
    pub kind: LogicErrorKind,
    pub design_reference: Option<Arc<dyn Reference>>,
}
Expand description

Handles and describe a Mélodium logic error.

Fields§

§id: u32

Identifier of error.

§kind: LogicErrorKind

Kind of error.

§design_reference: Option<Arc<dyn Reference>>

Optional design reference attached to error.

Implementations§

source§

impl LogicError

source

pub fn collection_undefined( id: u32, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::CollectionUndefined kind.

source

pub fn uncommited_descriptor( id: u32, identifier: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UncommitedDescriptor kind.

source

pub fn no_designer( id: u32, identifier: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::NoDesigner kind.

source

pub fn erroneous_design( id: u32, identifier: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ErroneousDesign kind.

source

pub fn erroneous_checks( id: u32, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ErroneousChecks kind.

source

pub fn unavailable_design( id: u32, identifier: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnavailableDesign kind.

source

pub fn unexisting_variable( id: u32, identifier: Identifier, parameter: String, variable: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingVariable kind.

source

pub fn unexisting_context_variable( id: u32, identifier: Identifier, parameter: String, context: Identifier, variable: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingContextVariable kind.

source

pub fn unexisting_parameter( id: u32, scope: Identifier, called: Identifier, parameter: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingParameter kind.

source

pub fn unmatching_datatype( id: u32, scope: Identifier, called: Identifier, parameter: String, value: Value, expected: DataType, given: DataType, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnmatchingDataType kind.

source

pub fn unset_parameter( id: u32, scope: Identifier, called: Identifier, parameter: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnsetParameter kind.

source

pub fn multiple_parameter_assignation( id: u32, scope: Identifier, called: Identifier, parameter: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::MultipleParameterAssignation kind.

source

pub fn no_value( id: u32, scope: Identifier, called: Identifier, parameter: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::NoValue kind.

source

pub fn no_context( id: u32, scope: Identifier, model: Identifier, name: String, parameter: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::NoContext kind.

source

pub fn unavailable_context( id: u32, scope: Identifier, context: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnavailableContext kind.

source

pub fn connection_input_not_found( id: u32, scope: Identifier, to: Identifier, input: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ConnectionInputNotFound kind.

source

pub fn connection_self_input_not_found( id: u32, scope: Identifier, input: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ConnectionSelfInputNotFound kind.

source

pub fn connection_output_not_found( id: u32, scope: Identifier, from: Identifier, output: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ConnectionOutputNotFound kind.

source

pub fn connection_self_output_not_found( id: u32, scope: Identifier, output: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ConnectionSelfOutputNotFound kind.

source

pub fn unexisting_treatment( id: u32, scope: Identifier, claimed: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingTreatment kind.

source

pub fn unexisting_model( id: u32, scope: Identifier, claimed: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingModel kind.

source

pub fn unexisting_context( id: u32, scope: Identifier, claimed: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingContext kind.

source

pub fn unexisting_function( id: u32, scope: Identifier, claimed: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingFunction kind.

source

pub fn undeclared_model( id: u32, scope: Identifier, model: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UndeclaredModel kind.

source

pub fn undeclared_treatment( id: u32, scope: Identifier, treatment: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UndeclaredTreatment kind.

source

pub fn unexisting_connexion_type( id: u32, scope: Identifier, from: String, output: String, to: String, input: String, output_flow: Flow, output_type: DataType, input_flow: Flow, input_type: DataType, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingConnectionType kind.

source

pub fn unsatisfied_output( id: u32, scope: Identifier, output: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnsatisfiedOutput kind.

source

pub fn overloaded_output( id: u32, scope: Identifier, output: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::OverloadedOutput kind.

source

pub fn unmatching_model_type( id: u32, scope: Identifier, called: Identifier, name: String, expected: Identifier, given_name: String, given: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnmatchingModelType kind.

source

pub fn unexisting_parametric_model( id: u32, scope: Identifier, called: Identifier, parametric_model: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnexistingParametricModel kind.

source

pub fn unset_model( id: u32, scope: Identifier, called: Identifier, parametric_model: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnsetModel kind.

source

pub fn already_included_build_step( id: u32, treatment: Identifier, cause_step: CheckStep, check_steps: Vec<CheckStep>, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::AlreadyIncludedBuildStep kind.

source

pub fn unsatisfied_input( id: u32, scope: Option<Identifier>, treatment: String, input: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnsatisfiedInput kind.

source

pub fn const_required_var_provided( id: u32, scope: Identifier, called: Identifier, parameter: String, variable: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ConstRequiredVarProvided kind.

source

pub fn const_required_context_provided( id: u32, scope: Identifier, called: Identifier, parameter: String, context: Identifier, entry: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ConstRequiredContextProvided kind.

source

pub fn model_instanciation_const_only( id: u32, scope: Identifier, called: Identifier, name: String, parameter: String, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ModelInstanciationConstOnly kind.

source

pub fn const_required_function_returns_var( id: u32, scope: Identifier, called: Identifier, parameter: String, function: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::ConstRequiredFunctionReturnsVar kind.

source

pub fn unmatching_number_of_parameters( id: u32, scope: Identifier, function: Identifier, design_reference: Option<Arc<dyn Reference>> ) -> Self

Generates a new error with LogicErrorKind::UnmatchingNumberOfParameters kind.

Trait Implementations§

source§

impl Clone for LogicError

source§

fn clone(&self) -> LogicError

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for LogicError

source§

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

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

impl Display for LogicError

source§

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

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

impl From<LogicError> for LogicErrors

source§

fn from(value: LogicError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast for Twhere T: Any,

source§

fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T, Global>) -> Arc<dyn Any + Sync + Send, Global>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.