Struct ForeignError
pub struct ForeignError(pub Arc<dyn Any + Send + Sync>);Expand description
The opaque payload a ParseError::CustomLex carries out of a failed
custom-lexer pull (crate::custom::CustomLexError::Custom): an owned,
thread-safe Any a binding downcasts back to its host exception with
identity intact (in Lark, the custom lexer’s exception escapes parse
unwrapped — a stored PyErr round-trips through here). Arc keeps
ParseError Clone; equality is payload identity (Arc::ptr_eq), the
only equivalence an opaque value supports.
Tuple Fields§
§0: Arc<dyn Any + Send + Sync>Implementations§
Trait Implementations§
§impl Clone for ForeignError
impl Clone for ForeignError
§fn clone(&self) -> ForeignError
fn clone(&self) -> ForeignError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ForeignError
impl Debug for ForeignError
impl Eq for ForeignError
Auto Trait Implementations§
impl !RefUnwindSafe for ForeignError
impl !UnwindSafe for ForeignError
impl Freeze for ForeignError
impl Send for ForeignError
impl Sync for ForeignError
impl Unpin for ForeignError
impl UnsafeUnpin for ForeignError
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