pub struct ForeignError {
pub code: i32,
pub message: String,
}Expand description
A consumer’s callback-interface implementation failed. A callback
method’s error type converts from it (E: From<ForeignError>), and it’s
a valid error type itself.
A failure a consumer’s callback-interface implementation reported, or a
value it returned that the producer couldn’t accept.
A callback method’s error type converts from it (E: From<ForeignError>), and it’s a valid error type itself (throws any).
code is [FOREIGN_ERROR_CODE] for a consumer failure, and
[MARSHAL_ERROR_CODE] for a return the producer couldn’t accept. A
declared code of the method’s own domain never arrives as a
ForeignError; it’s decoded into the typed error instead.
Fields§
§code: i32The failure’s code.
message: StringThe consumer’s message.
Implementations§
Trait Implementations§
Source§impl Clone for ForeignError
impl Clone for ForeignError
Source§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 moreSource§impl Debug for ForeignError
impl Debug for ForeignError
Source§impl Display for ForeignError
impl Display for ForeignError
impl Eq for ForeignError
Source§impl Error for ForeignError
impl Error for ForeignError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ForeignError
impl PartialEq for ForeignError
impl StructuralPartialEq for ForeignError
Auto Trait Implementations§
impl Freeze for ForeignError
impl RefUnwindSafe for ForeignError
impl Send for ForeignError
impl Sync for ForeignError
impl Unpin for ForeignError
impl UnsafeUnpin for ForeignError
impl UnwindSafe 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