pub struct TlcErr {
pub error_code: TlcErrorCode,
pub extra_data: Option<TlcErrData>,
}Expand description
Structured TLC error with error code and optional extra data.
Fields§
§error_code: TlcErrorCode§extra_data: Option<TlcErrData>Implementations§
Source§impl TlcErr
impl TlcErr
pub fn new(error_code: TlcErrorCode) -> Self
pub fn new_node_fail(error_code: TlcErrorCode, node_id: Pubkey) -> Self
pub fn new_channel_fail( error_code: TlcErrorCode, node_id: Pubkey, channel_outpoint: OutPoint, channel_update: Option<ChannelUpdate>, ) -> Self
pub fn error_node_id(&self) -> Option<Pubkey>
pub fn error_channel_outpoint(&self) -> Option<OutPoint>
pub fn error_code(&self) -> TlcErrorCode
pub fn error_code_as_str(&self) -> String
pub fn error_code_as_u16(&self) -> u16
pub fn set_extra_data(&mut self, extra_data: TlcErrData)
pub fn serialize(&self) -> Vec<u8> ⓘ
pub fn deserialize(data: &[u8]) -> Option<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlcErr
impl<'de> Deserialize<'de> for TlcErr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for TlcErr
Auto Trait Implementations§
impl !Freeze for TlcErr
impl RefUnwindSafe for TlcErr
impl Send for TlcErr
impl Sync for TlcErr
impl Unpin for TlcErr
impl UnsafeUnpin for TlcErr
impl UnwindSafe for TlcErr
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