Extract rust snippets and reference them

This commit is contained in:
ok300
2023-10-20 17:36:58 +02:00
parent c719cc4ae6
commit 32c39e2543
32 changed files with 4069 additions and 144 deletions

32
snippets/rust/src/main.rs Normal file
View File

@@ -0,0 +1,32 @@
mod getting_started;
mod receive_payment;
mod send_payment;
mod send_spontaneous_payment;
mod list_payments;
mod connecting_lsp;
mod receive_onchain;
mod send_onchain;
mod lnurl_pay;
mod lnurl_withdraw;
mod lnurl_auth;
mod fiat_currencies;
mod buy_btc;
mod static_channel_backup;
use std::str::FromStr;
use anyhow::Result;
use breez_sdk_core::*;
use log::info;
struct AppEventListener {}
impl EventListener for AppEventListener {
fn on_event(&self, e: BreezEvent) {
info!("Received Breez event: {e:?}");
}
}
#[tokio::main]
async fn main() -> Result<()> {
Ok(())
}