pub struct ScriptError {
pub id: u32,
pub kind: ScriptErrorKind,
}
Expand description
Fields§
§id: u32
Identifier of error.
kind: ScriptErrorKind
Kind of error.
Implementations§
Source§impl ScriptError
impl ScriptError
Sourcepub fn word(id: u32, word: Word, expected: &'static [Kind]) -> Self
pub fn word(id: u32, word: Word, expected: &'static [Kind]) -> Self
Creates a new error of Word kind.
The ScriptError created that way will be of ScriptErrorKind::Word kind. Each parameter matches the properties of ScriptError.
Sourcepub fn end_of_script(id: u32) -> Self
pub fn end_of_script(id: u32) -> Self
Creates a new error of EndOfScript kind.
The ScriptError created that way will be of ScriptErrorKind::EndOfScript kind.
pub fn description_element_expected( id: u32, word: Word, element: Word, expected: &'static [&'static str], ) -> Self
pub fn declaration_expected( id: u32, word: Word, expected: &'static [&'static str], ) -> Self
pub fn invalid_root(id: u32, text: PositionnedString, root: String) -> Self
pub fn already_used_name(id: u32, text: PositionnedString) -> Self
pub fn invalid_type(id: u32, text: PositionnedString) -> Self
pub fn invalid_structure(id: u32, text: PositionnedString) -> Self
pub fn unimported_element(id: u32, text: PositionnedString) -> Self
pub fn already_declared(id: u32, text: PositionnedString) -> Self
pub fn already_assigned(id: u32, text: PositionnedString) -> Self
pub fn missing_type(id: u32, text: PositionnedString) -> Self
pub fn missing_value(id: u32, text: PositionnedString) -> Self
pub fn default_forbidden(id: u32, text: PositionnedString) -> Self
pub fn default_forbidden_for_generics( id: u32, text: PositionnedString, generic: String, ) -> Self
pub fn const_declaration_only(id: u32, text: PositionnedString) -> Self
pub fn flow_forbidden(id: u32, text: PositionnedString) -> Self
pub fn structure_forbidden(id: u32, text: PositionnedString) -> Self
pub fn type_forbidden(id: u32, text: PositionnedString) -> Self
pub fn connection_must_transmit_data( id: u32, from: PositionnedString, to: PositionnedString, ) -> Self
pub fn treatment_not_found(id: u32, text: PositionnedString) -> Self
pub fn name_required(id: u32, text: PositionnedString) -> Self
pub fn undeclared_model(id: u32, text: PositionnedString) -> Self
pub fn undeclared_parameter(id: u32, text: PositionnedString) -> Self
pub fn undeclared_context(id: u32, text: PositionnedString) -> Self
pub fn undeclared_data(id: u32, text: PositionnedString) -> Self
pub fn reference_unset(id: u32, debug_reference: String) -> Self
pub fn invalid_boolean(id: u32, text: PositionnedString) -> Self
pub fn invalid_number(id: u32, text: PositionnedString) -> Self
pub fn invalid_string(id: u32, text: PositionnedString) -> Self
pub fn invalid_character(id: u32, text: PositionnedString) -> Self
pub fn invalid_byte(id: u32, text: PositionnedString) -> Self
pub fn executive_restitution_failed( id: u32, text: PositionnedString, message: String, ) -> Self
pub fn missing_function_parameter( id: u32, text: PositionnedString, index: usize, ) -> Self
pub fn missing_function_generic( id: u32, text: PositionnedString, index: usize, ) -> Self
pub fn missing_treatment_generic(id: u32, text: PositionnedString) -> Self
pub fn invalid_generic(id: u32, text: PositionnedString) -> Self
pub fn invalid_trait(id: u32, text: PositionnedString) -> Self
pub fn unexisting_dependency( id: u32, text: PositionnedString, root: String, ) -> Self
pub fn logic(id: u32, error: LogicError) -> Self
pub fn no_descriptor(id: u32, name: PositionnedString) -> Self
Trait Implementations§
Source§impl Clone for ScriptError
impl Clone for ScriptError
Source§fn clone(&self) -> ScriptError
fn clone(&self) -> ScriptError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ScriptError
impl Debug for ScriptError
Source§impl Display for ScriptError
impl Display for ScriptError
Source§impl Error for ScriptError
impl Error for ScriptError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<LogicError> for ScriptError
impl From<LogicError> for ScriptError
Source§fn from(le: LogicError) -> Self
fn from(le: LogicError) -> Self
Converts to this type from the input type.
Source§impl From<ScriptError> for ScriptErrors
impl From<ScriptError> for ScriptErrors
Source§fn from(value: ScriptError) -> Self
fn from(value: ScriptError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ScriptError
impl !RefUnwindSafe for ScriptError
impl Send for ScriptError
impl Sync for ScriptError
impl Unpin for ScriptError
impl !UnwindSafe for ScriptError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
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)
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 T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more