pub struct Cluster {
pub nodes: Vec<Node>,
pub cache: Connection,
pub inv_exp_sec: i64,
pub addr_exp_sec: i64,
pub utxo_exp_sec: i64,
}
Fields§
§nodes: Vec<Node>
§cache: Connection
§inv_exp_sec: i64
§addr_exp_sec: i64
§utxo_exp_sec: i64
Implementations§
Source§impl Cluster
impl Cluster
pub fn new( nodes: Vec<Node>, redis: Connection, inv_exp_sec: i64, addr_exp_sec: i64, utxo_exp_sec: i64, ) -> Cluster
pub async fn lookup_invoice( &mut 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(&mut self, pubkey: Option<String>) -> Result<String>
pub async fn list_utxos(&mut 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 Freeze for Cluster
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