Struct vls_protocol_signer::handler::RootHandler
source · pub struct RootHandler { /* private fields */ }Expand description
Protocol handler
Implementations§
source§impl RootHandler
impl RootHandler
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.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> Downcast for T
impl<T> Downcast for T
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