Struct lightning_cluster::cluster::Cluster
source · pub struct Cluster {
pub nodes: Vec<Node>,
pub next_node_index: usize,
pub invoice_cache: Cache<String, ClusterLookupInvoice>,
pub address_cache: Cache<String, String>,
pub utxo_cache: Cache<String, ClusterUtxos>,
}
Fields§
§nodes: Vec<Node>
§next_node_index: usize
§invoice_cache: Cache<String, ClusterLookupInvoice>
§address_cache: Cache<String, String>
§utxo_cache: Cache<String, ClusterUtxos>
Implementations§
source§impl Cluster
impl Cluster
pub fn new(nodes: Vec<Node>) -> Cluster
pub async fn lookup_invoice( &self, r_hash: &str, pubkey: Option<String> ) -> Result<ClusterLookupInvoice>
pub async fn add_invoice( &self, req: ClusterAddInvoice, pubkey: Option<String> ) -> Result<AddInvoiceResponse>
pub async fn next_address(&self, pubkey: Option<String>) -> Result<String>
pub async fn list_utxos(&self, pubkey: Option<&str>) -> Result<ClusterUtxos>
pub async fn pay_invoice( &self, amount: u64, payment_request: String, max_fee: i64, pubkey: Option<String> ) -> Result<ClusterPayPaymentRequestRes>
Auto Trait Implementations§
impl !RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl !UnwindSafe for Cluster
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