pub struct ErrorMessage {
pub channel_id: ChannelId,
pub data: String,
}Expand description
An error message to be sent to or received from a peer.
Fields§
§channel_id: ChannelIdThe 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: StringA 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§
Source§impl Clone for ErrorMessage
impl Clone for ErrorMessage
Source§fn clone(&self) -> ErrorMessage
fn clone(&self) -> ErrorMessage
Returns a duplicate 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 ErrorMessage
impl Debug for ErrorMessage
Source§impl Hash for ErrorMessage
impl Hash for ErrorMessage
Source§impl PartialEq for ErrorMessage
impl PartialEq for ErrorMessage
Source§impl Readable for ErrorMessage
impl Readable for ErrorMessage
Source§impl Writeable for ErrorMessage
impl Writeable for ErrorMessage
impl Eq for ErrorMessage
impl StructuralPartialEq for ErrorMessage
Auto Trait Implementations§
impl Freeze for ErrorMessage
impl RefUnwindSafe for ErrorMessage
impl Send for ErrorMessage
impl Sync for ErrorMessage
impl Unpin for ErrorMessage
impl UnwindSafe for ErrorMessage
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