pub struct Attempt {Show 13 fields
pub id: u64,
pub try_limit: u32,
pub tried_times: u32,
pub hash: Hash256,
pub status: AttemptStatus,
pub payment_hash: Hash256,
pub route: SessionRoute,
pub route_hops: Vec<PaymentHopData>,
pub session_key: [u8; 32],
pub preimage: Option<Hash256>,
pub created_at: u64,
pub last_updated_at: u64,
pub last_error: Option<String>,
}Expand description
A payment attempt.
Fields§
§id: u64§try_limit: u32§tried_times: u32§hash: Hash256§status: AttemptStatus§payment_hash: Hash256§route: SessionRoute§route_hops: Vec<PaymentHopData>§session_key: [u8; 32]§preimage: Option<Hash256>§created_at: u64§last_updated_at: u64§last_error: Option<String>Implementations§
Source§impl Attempt
impl Attempt
pub fn set_inflight_status(&mut self)
pub fn set_success_status(&mut self)
pub fn set_failed_status(&mut self, error: &str, retryable: bool)
pub fn update_route(&mut self, new_route_hops: Vec<PaymentHopData>)
pub fn is_success(&self) -> bool
pub fn is_inflight(&self) -> bool
pub fn is_failed(&self) -> bool
pub fn is_active(&self) -> bool
pub fn is_retrying(&self) -> bool
pub fn first_hop_channel_outpoint_eq(&self, out_point: &OutPoint) -> bool
pub fn first_hop_channel_outpoint(&self) -> Option<&OutPoint>
pub fn channel_outpoints( &self, ) -> impl Iterator<Item = (Pubkey, &OutPoint, u128)>
pub fn hops_public_keys(&self) -> Vec<Pubkey>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Attempt
impl<'de> Deserialize<'de> for Attempt
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
Auto Trait Implementations§
impl Freeze for Attempt
impl RefUnwindSafe for Attempt
impl Send for Attempt
impl Sync for Attempt
impl Unpin for Attempt
impl UnsafeUnpin for Attempt
impl UnwindSafe for Attempt
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