Struct neon::types::JsError [−][src]
#[repr(C)]pub struct JsError(_);
Expand description
A JS Error
object.
Implementations
Creates a direct instance of the Error
class.
pub fn type_error<'a, C: Context<'a>, S: AsRef<str>>(
cx: &mut C,
msg: S
) -> NeonResult<Handle<'a, JsError>>
pub fn type_error<'a, C: Context<'a>, S: AsRef<str>>(
cx: &mut C,
msg: S
) -> NeonResult<Handle<'a, JsError>>
Creates an instance of the TypeError
class.
pub fn range_error<'a, C: Context<'a>, S: AsRef<str>>(
cx: &mut C,
msg: S
) -> NeonResult<Handle<'a, JsError>>
pub fn range_error<'a, C: Context<'a>, S: AsRef<str>>(
cx: &mut C,
msg: S
) -> NeonResult<Handle<'a, JsError>>
Creates an instance of the RangeError
class.
Trait Implementations
fn get<'a, C: Context<'a>, K: PropertyKey>(
self,
cx: &mut C,
key: K
) -> NeonResult<Handle<'a, JsValue>>
This is supported on crate feature
napi-6
only.fn set<'a, C: Context<'a>, K: PropertyKey, W: Value>(
self,
cx: &mut C,
key: K,
val: Handle<'_, W>
) -> NeonResult<bool>
Auto Trait Implementations
impl RefUnwindSafe for JsError
impl UnwindSafe for JsError
Blanket Implementations
Mutably borrows from an owned value. Read more