Struct nyar_error::NyarError
source · [−]pub struct NyarError { /* private fields */ }Implementations
sourceimpl NyarError
impl NyarError
pub fn lexer_error(msg: impl Into<String>) -> NyarError
pub fn invalid_operation(
op: &str,
lhs: Option<String>,
rhs: Option<String>,
position: Span
) -> NyarError
pub fn invalid_iterator(
item_type: impl Into<String>,
position: Span
) -> NyarError
pub fn invalid_cast(item_type: impl Into<String>, position: Span) -> NyarError
pub fn if_lost(position: Span) -> NyarError
pub fn if_non_bool(position: Span) -> NyarError
pub fn invalid_index(
index: impl Into<String>,
item_type: impl Into<String>,
position: Span
) -> NyarError
pub fn int_handler_not_found(
handler: impl Into<String>,
position: Span
) -> NyarError
pub fn variable_not_found(name: impl Into<String>, position: Span) -> NyarError
pub fn write_unwritable_object(
name: impl Into<String>,
position: Span
) -> NyarError
pub fn msg(text: impl Into<String>) -> NyarError
Trait Implementations
sourceimpl Error for NyarError
impl Error for NyarError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<ParseFloatError> for NyarError
impl From<ParseFloatError> for NyarError
sourcefn from(e: ParseFloatError) -> Self
fn from(e: ParseFloatError) -> Self
Converts to this type from the input type.
sourceimpl From<ParseIntError> for NyarError
impl From<ParseIntError> for NyarError
sourcefn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for NyarError
impl Send for NyarError
impl Sync for NyarError
impl Unpin for NyarError
impl !UnwindSafe for NyarError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more