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§impl Debug for ErrorMessage
impl Debug for ErrorMessage
impl Eq for ErrorMessage
Source§impl Hash for ErrorMessage
impl Hash for ErrorMessage
Source§impl PartialEq for ErrorMessage
impl PartialEq for ErrorMessage
impl StructuralPartialEq for ErrorMessage
Auto Trait Implementations§
impl Forget for ErrorMessage
impl Freeze for ErrorMessage
impl Move for ErrorMessage
impl RefUnwindSafe for ErrorMessage
impl Send for ErrorMessage
impl Sync for ErrorMessage
impl Unpin for ErrorMessage
impl UnsafeUnpin 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