Expand description
An error message to be sent or received from a peer
Fields
channel_id: [u8; 32]
The channel ID involved in the error.
All-0s indicates a general error unrelated to a specific channel, after which all channels with the sending peer should be closed.
data: String
A possibly human-readable error description. The string should be sanitized before it is used (e.g. emitted to logs or printed to stdout). Otherwise, a well crafted error message may trigger a security vulnerability in the terminal emulator or the logging subsystem.
Trait Implementations
sourceimpl Clone for ErrorMessage
impl Clone for ErrorMessage
sourcefn clone(&self) -> ErrorMessage
fn clone(&self) -> ErrorMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ErrorMessage
impl Debug for ErrorMessage
sourceimpl PartialEq<ErrorMessage> for ErrorMessage
impl PartialEq<ErrorMessage> for ErrorMessage
sourcefn eq(&self, other: &ErrorMessage) -> bool
fn eq(&self, other: &ErrorMessage) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ErrorMessage) -> bool
fn ne(&self, other: &ErrorMessage) -> bool
This method tests for !=
.
sourceimpl Readable for ErrorMessage
impl Readable for ErrorMessage
sourceimpl Writeable for ErrorMessage
impl Writeable for ErrorMessage
sourcefn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Writes self out to a Vec
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
impl StructuralPartialEq for ErrorMessage
Auto Trait Implementations
impl RefUnwindSafe for ErrorMessage
impl Send for ErrorMessage
impl Sync for ErrorMessage
impl Unpin for ErrorMessage
impl UnwindSafe for ErrorMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more