pub struct ChannelStub {
pub node: Weak<Node>,
pub keys: InMemorySigner,
pub id0: ChannelId,
pub blockheight: u32,
/* private fields */
}
Expand description
A channel takes this form after Node::new_channel, and before Node::setup_channel
Fields§
§node: Weak<Node>
A backpointer to the node
keys: InMemorySigner
The signer for this channel
id0: ChannelId
The initial channel ID, used to find the channel in the node
blockheight: u32
Blockheight when created
Trait Implementations§
Source§impl ChannelBase for ChannelStub
impl ChannelBase for ChannelStub
Source§fn get_channel_basepoints(&self) -> ChannelPublicKeys
fn get_channel_basepoints(&self) -> ChannelPublicKeys
Get the channel basepoints and public keys
Source§fn get_per_commitment_point(
&self,
commitment_number: u64,
) -> Result<PublicKey, Status>
fn get_per_commitment_point( &self, commitment_number: u64, ) -> Result<PublicKey, Status>
Get the per-commitment point for a holder commitment transaction.
Errors if the commitment number is too high given the current state.
Source§fn get_per_commitment_secret(
&self,
_commitment_number: u64,
) -> Result<SecretKey, Status>
fn get_per_commitment_secret( &self, _commitment_number: u64, ) -> Result<SecretKey, Status>
Get the per-commitment secret for a holder commitment transaction
Errors if the commitment number is not ready to be revoked given the current state.
Source§fn get_per_commitment_secret_or_none(
&self,
_commitment_number: u64,
) -> Option<SecretKey>
fn get_per_commitment_secret_or_none( &self, _commitment_number: u64, ) -> Option<SecretKey>
Get the per-commitment secret or None if the arg is out of range
Source§impl Clone for ChannelStub
impl Clone for ChannelStub
Source§fn clone(&self) -> ChannelStub
fn clone(&self) -> ChannelStub
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 moreAuto Trait Implementations§
impl !Freeze for ChannelStub
impl !RefUnwindSafe for ChannelStub
impl Send for ChannelStub
impl Sync for ChannelStub
impl Unpin for ChannelStub
impl !UnwindSafe for ChannelStub
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more