pub struct RootHandler { /* private fields */ }
Expand description
Protocol handler
Implementations§
Source§impl RootHandler
impl RootHandler
Sourcepub fn log_chaninfo(&self)
pub fn log_chaninfo(&self)
Log channel information
Sourcepub fn channel_balance(&self) -> ChannelBalance
pub fn channel_balance(&self) -> ChannelBalance
Get the channel balances
Sourcepub fn get_chain_height(&self) -> u32
pub fn get_chain_height(&self) -> u32
Get the current chain height based on the tracker
Trait Implementations§
Source§impl Clone for RootHandler
impl Clone for RootHandler
Source§fn clone(&self) -> RootHandler
fn clone(&self) -> RootHandler
Returns a copy 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 Handler for RootHandler
impl Handler for RootHandler
Source§fn for_new_client(
&self,
client_id: u64,
peer_id: PubKey,
dbid: u64,
) -> ChannelHandler
fn for_new_client( &self, client_id: u64, peer_id: PubKey, dbid: u64, ) -> ChannelHandler
Create a channel handler
Source§fn node(&self) -> &Arc<Node>
fn node(&self) -> &Arc<Node>
Get the associated signing node.
Note that if you want to perform an operation that can result in a mutation
of the node state requiring a persist, and your persister writes to the cloud,
you must use
Handler::with_persist
instead.Source§fn with_persist(&self, f: impl FnOnce(&Node) -> Result<()>) -> Result<Mutations>
fn with_persist(&self, f: impl FnOnce(&Node) -> Result<()>) -> Result<Mutations>
Perform an operation on the Node that requires persistence.
The operation must not mutate if it fails (returns an error).
You must call
Handler::commit
after you persist the mutations in the
cloud.Source§impl Into<RootHandler> for InitHandler
impl Into<RootHandler> for InitHandler
Source§fn into(self) -> RootHandler
fn into(self) -> RootHandler
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for RootHandler
impl !RefUnwindSafe for RootHandler
impl Send for RootHandler
impl Sync for RootHandler
impl Unpin for RootHandler
impl !UnwindSafe for RootHandler
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> Downcast for T
impl<T> Downcast for T
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