pub struct PanicInstruction { /* private fields */ }
Expand description
Describe a panic reason with the instruction that generated it
Implementations§
source§impl PanicInstruction
impl PanicInstruction
sourcepub const fn error(reason: PanicReason, instruction: RawInstruction) -> Self
pub const fn error(reason: PanicReason, instruction: RawInstruction) -> Self
Represents an error described by a reason and an instruction.
sourcepub const fn reason(&self) -> &PanicReason
pub const fn reason(&self) -> &PanicReason
Underlying panic reason
sourcepub const fn instruction(&self) -> &RawInstruction
pub const fn instruction(&self) -> &RawInstruction
Underlying instruction
source§impl PanicInstruction
impl PanicInstruction
sourcepub fn error_typescript(
reason: PanicReason,
instruction: RawInstruction,
) -> Self
Available on crate feature typescript
only.
pub fn error_typescript( reason: PanicReason, instruction: RawInstruction, ) -> Self
typescript
only.Represents an error described by a reason and an instruction.
sourcepub fn reason_typescript(&self) -> PanicReason
Available on crate feature typescript
only.
pub fn reason_typescript(&self) -> PanicReason
typescript
only.Underlying panic reason
sourcepub fn instruction_typescript(&self) -> RawInstruction
Available on crate feature typescript
only.
pub fn instruction_typescript(&self) -> RawInstruction
typescript
only.Underlying instruction
Trait Implementations§
source§impl Clone for PanicInstruction
impl Clone for PanicInstruction
source§fn clone(&self) -> PanicInstruction
fn clone(&self) -> PanicInstruction
Returns a copy 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 PanicInstruction
impl Debug for PanicInstruction
source§impl<'de> Deserialize<'de> for PanicInstruction
impl<'de> Deserialize<'de> for PanicInstruction
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Deserialize for PanicInstruction
impl Deserialize for PanicInstruction
source§fn decode_static<I: Input + ?Sized>(buffer: &mut I) -> Result<Self, Error>
fn decode_static<I: Input + ?Sized>(buffer: &mut I) -> Result<Self, Error>
Decodes static part of
Self
from the buffer
.source§fn decode_dynamic<I: Input + ?Sized>(
&mut self,
buffer: &mut I,
) -> Result<(), Error>
fn decode_dynamic<I: Input + ?Sized>( &mut self, buffer: &mut I, ) -> Result<(), Error>
Decodes dynamic part of the information from the
buffer
to fill Self
.
The default implementation does nothing. Dynamically-sized contains should
override this.source§impl From<PanicInstruction> for JsValue
impl From<PanicInstruction> for JsValue
source§fn from(value: PanicInstruction) -> Self
fn from(value: PanicInstruction) -> Self
Converts to this type from the input type.
source§impl From<PanicInstruction> for Word
impl From<PanicInstruction> for Word
source§fn from(r: PanicInstruction) -> Word
fn from(r: PanicInstruction) -> Word
Converts to this type from the input type.
source§impl From<u64> for PanicInstruction
impl From<u64> for PanicInstruction
source§impl FromWasmAbi for PanicInstruction
impl FromWasmAbi for PanicInstruction
source§impl Hash for PanicInstruction
impl Hash for PanicInstruction
source§impl IntoWasmAbi for PanicInstruction
impl IntoWasmAbi for PanicInstruction
source§impl OptionFromWasmAbi for PanicInstruction
impl OptionFromWasmAbi for PanicInstruction
source§impl OptionIntoWasmAbi for PanicInstruction
impl OptionIntoWasmAbi for PanicInstruction
source§impl PartialEq for PanicInstruction
impl PartialEq for PanicInstruction
source§impl RefFromWasmAbi for PanicInstruction
impl RefFromWasmAbi for PanicInstruction
source§type Anchor = RcRef<PanicInstruction>
type Anchor = RcRef<PanicInstruction>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for PanicInstruction
impl RefMutFromWasmAbi for PanicInstruction
source§impl Serialize for PanicInstruction
impl Serialize for PanicInstruction
source§fn size_static(&self) -> usize
fn size_static(&self) -> usize
Size of the static part of the serialized object, in bytes.
Saturates to usize::MAX on overflow.
source§fn size_dynamic(&self) -> usize
fn size_dynamic(&self) -> usize
Size of the dynamic part, in bytes.
Saturates to usize::MAX on overflow.
source§fn encode_static<O: Output + ?Sized>(&self, buffer: &mut O) -> Result<(), Error>
fn encode_static<O: Output + ?Sized>(&self, buffer: &mut O) -> Result<(), Error>
Encodes staticly-sized part of
Self
.source§fn encode_dynamic<O: Output + ?Sized>(
&self,
buffer: &mut O,
) -> Result<(), Error>
fn encode_dynamic<O: Output + ?Sized>( &self, buffer: &mut O, ) -> Result<(), Error>
Encodes dynamically-sized part of
Self
.
The default implementation does nothing. Dynamically-sized contains should
override this.source§fn size(&self) -> usize
fn size(&self) -> usize
Total size of the serialized object, in bytes.
Saturates to usize::MAX on overflow.
source§impl Serialize for PanicInstruction
impl Serialize for PanicInstruction
source§impl TryFromJsValue for PanicInstruction
impl TryFromJsValue for PanicInstruction
source§impl VectorFromWasmAbi for PanicInstruction
impl VectorFromWasmAbi for PanicInstruction
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[PanicInstruction]>
source§impl VectorIntoJsValue for PanicInstruction
impl VectorIntoJsValue for PanicInstruction
fn vector_into_jsvalue(vector: Box<[PanicInstruction]>) -> JsValue
source§impl VectorIntoWasmAbi for PanicInstruction
impl VectorIntoWasmAbi for PanicInstruction
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[PanicInstruction]>) -> Self::Abi
source§impl WasmDescribeVector for PanicInstruction
impl WasmDescribeVector for PanicInstruction
impl Copy for PanicInstruction
impl Eq for PanicInstruction
impl StructuralPartialEq for PanicInstruction
Auto Trait Implementations§
impl Freeze for PanicInstruction
impl RefUnwindSafe for PanicInstruction
impl Send for PanicInstruction
impl Sync for PanicInstruction
impl Unpin for PanicInstruction
impl UnwindSafe for PanicInstruction
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.