pub struct ShortChannelId(/* private fields */);Expand description
Short channel ID (SCID) - compact channel identifier.
Encodes block height, transaction index, and output index.
Implementations§
Source§impl ShortChannelId
impl ShortChannelId
Sourcepub fn new(block_height: u32, tx_index: u32, output_index: u16) -> Self
pub fn new(block_height: u32, tx_index: u32, output_index: u16) -> Self
Create from components.
Sourcepub fn parse(s: &str) -> Result<Self, LightningError>
pub fn parse(s: &str) -> Result<Self, LightningError>
Parse from string format “block:tx:output”.
Sourcepub fn block_height(&self) -> u32
pub fn block_height(&self) -> u32
Get the block height.
Sourcepub fn output_index(&self) -> u16
pub fn output_index(&self) -> u16
Get the output index.
Trait Implementations§
Source§impl Clone for ShortChannelId
impl Clone for ShortChannelId
Source§fn clone(&self) -> ShortChannelId
fn clone(&self) -> ShortChannelId
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 ShortChannelId
impl Debug for ShortChannelId
Source§impl Display for ShortChannelId
impl Display for ShortChannelId
Source§impl Hash for ShortChannelId
impl Hash for ShortChannelId
Source§impl PartialEq for ShortChannelId
impl PartialEq for ShortChannelId
impl Copy for ShortChannelId
impl Eq for ShortChannelId
impl StructuralPartialEq for ShortChannelId
Auto Trait Implementations§
impl Freeze for ShortChannelId
impl RefUnwindSafe for ShortChannelId
impl Send for ShortChannelId
impl Sync for ShortChannelId
impl Unpin for ShortChannelId
impl UnwindSafe for ShortChannelId
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