pub struct ChannelPoint { /* private fields */ }Expand description
A channel point identifying a Lightning channel.
A channel point consists of a funding transaction ID and output index.
Implementations§
Source§impl ChannelPoint
impl ChannelPoint
Sourcepub fn from_parts(
txid_hex: &str,
output_index: u32,
) -> Result<Self, LightningError>
pub fn from_parts( txid_hex: &str, output_index: u32, ) -> Result<Self, LightningError>
Create from txid hex string and output index.
Sourcepub fn parse(s: &str) -> Result<Self, LightningError>
pub fn parse(s: &str) -> Result<Self, LightningError>
Parse from string format “txid:index”.
Sourcepub fn output_index(&self) -> u32
pub fn output_index(&self) -> u32
Get the output index.
Sourcepub fn to_string_format(&self) -> String
pub fn to_string_format(&self) -> String
Convert to the standard string format “txid:index”.
Sourcepub fn txid_bytes(&self) -> &[u8; 32]
pub fn txid_bytes(&self) -> &[u8; 32]
Get the raw txid bytes (not reversed).
Trait Implementations§
Source§impl Clone for ChannelPoint
impl Clone for ChannelPoint
Source§fn clone(&self) -> ChannelPoint
fn clone(&self) -> ChannelPoint
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 ChannelPoint
impl Debug for ChannelPoint
Source§impl Display for ChannelPoint
impl Display for ChannelPoint
Source§impl FromStr for ChannelPoint
impl FromStr for ChannelPoint
Source§impl Hash for ChannelPoint
impl Hash for ChannelPoint
Source§impl PartialEq for ChannelPoint
impl PartialEq for ChannelPoint
impl Eq for ChannelPoint
impl StructuralPartialEq for ChannelPoint
Auto Trait Implementations§
impl Freeze for ChannelPoint
impl RefUnwindSafe for ChannelPoint
impl Send for ChannelPoint
impl Sync for ChannelPoint
impl Unpin for ChannelPoint
impl UnwindSafe for ChannelPoint
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