pub enum ErrorAction {
DisconnectPeer {
msg: Option<ErrorMessage>,
},
IgnoreError,
IgnoreAndLog(Level),
IgnoreDuplicateGossip,
SendErrorMessage {
msg: ErrorMessage,
},
SendWarningMessage {
msg: WarningMessage,
log_level: Level,
},
}
Expand description
Used to put an error message in a LightningError
Variants
DisconnectPeer
Fields
msg: Option<ErrorMessage>
An error message which we should make an effort to send before we disconnect.
The peer took some action which made us think they were useless. Disconnect them.
IgnoreError
The peer did something harmless that we weren’t able to process, just log and ignore
IgnoreAndLog(Level)
The peer did something harmless that we weren’t able to meaningfully process. If the error is logged, log it at the given level.
IgnoreDuplicateGossip
The peer provided us with a gossip message which we’d already seen. In most cases this should be ignored, but it may result in the message being forwarded if it is a duplicate of our own channel announcements.
SendErrorMessage
Fields
msg: ErrorMessage
The message to send.
The peer did something incorrect. Tell them.
SendWarningMessage
Fields
msg: WarningMessage
The message to send.
log_level: Level
The peer may have done something harmless that we weren’t able to meaningfully process, though we should still tell them about it. If this event is logged, log it at the given level.
The peer did something incorrect. Tell them without closing any channels.
Trait Implementations
sourceimpl Clone for ErrorAction
impl Clone for ErrorAction
sourcefn clone(&self) -> ErrorAction
fn clone(&self) -> ErrorAction
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
Auto Trait Implementations
impl RefUnwindSafe for ErrorAction
impl Send for ErrorAction
impl Sync for ErrorAction
impl Unpin for ErrorAction
impl UnwindSafe for ErrorAction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more