Enum rquickjs_core::Error [−][src]
Error type of the library.
Variants
Could not allocate memory This is generally only triggered when out of memory.
InvalidString(NulError)
Found a string with a internal null byte while converting to C string.
Utf8(Utf8Error)
String from rquickjs was not UTF-8
Io(IoError)
An io error
An exception raised by quickjs itself.
Error converting from javascript to a rust type.
Error converting to javascript from a rust type.
Error matching of function arguments
Error when resolving js module
Error when loading js module
An error from quickjs from which the specifics are unknown. Should eventually be removed as development progresses.
Implementations
impl Error
[src]
pub fn new_resolving<B, N>(base: B, name: N) -> Self where
StdString: From<B> + From<N>,
[src]
StdString: From<B> + From<N>,
Create resolving error
pub fn new_resolving_message<B, N, M>(base: B, name: N, msg: M) -> Self where
StdString: From<B> + From<N> + From<M>,
[src]
StdString: From<B> + From<N> + From<M>,
Create resolving error with message
pub fn is_resolving(&self) -> bool
[src]
Returns whether the error is a resolving error
pub fn new_loading<N>(name: N) -> Self where
StdString: From<N>,
[src]
StdString: From<N>,
Create loading error
pub fn new_loading_message<N, M>(name: N, msg: M) -> Self where
StdString: From<N> + From<M>,
[src]
StdString: From<N> + From<M>,
Create loading error
pub fn is_loading(&self) -> bool
[src]
Returns whether the error is a loading error
pub fn is_exception(&self) -> bool
[src]
Returns whether the error is a quickjs generated exception.
pub fn new_from_js(from: &'static str, to: &'static str) -> Self
[src]
Create from JS conversion error
pub fn new_from_js_message<M>(
from: &'static str,
to: &'static str,
msg: M
) -> Self where
StdString: From<M>,
[src]
from: &'static str,
to: &'static str,
msg: M
) -> Self where
StdString: From<M>,
Create from JS conversion error with message
pub fn new_into_js(from: &'static str, to: &'static str) -> Self
[src]
Create into JS conversion error
pub fn new_into_js_message<M>(
from: &'static str,
to: &'static str,
msg: M
) -> Self where
StdString: From<M>,
[src]
from: &'static str,
to: &'static str,
msg: M
) -> Self where
StdString: From<M>,
Create into JS conversion error with message
pub fn is_from_js(&self) -> bool
[src]
Returns whether the error is a from JS conversion error
pub fn is_from_js_to_js(&self) -> bool
[src]
Returns whether the error is a from JS to JS type conversion error
pub fn is_into_js(&self) -> bool
[src]
Returns whether the error is an into JS conversion error
pub fn new_num_args(expected: Range<usize>, given: usize) -> Self
[src]
Create function args mismatch error
pub fn is_num_args(&self) -> bool
[src]
Return whether the error is an function args mismatch error
Trait Implementations
impl Debug for Error
[src]
impl Display for Error
[src]
impl Error for Error
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<Error> for Error
[src]
impl From<FromUtf8Error> for Error
[src]
fn from(error: FromUtf8Error) -> Self
[src]
impl From<NulError> for Error
[src]
impl From<Utf8Error> for Error
[src]
impl<'js> FromJs<'js> for Error
[src]
impl<'js> IntoJs<'js> for &Error
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Error
[src]
impl Send for Error
[src]
impl Sync for Error
[src]
impl Unpin for Error
[src]
impl !UnwindSafe for Error
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,