pub struct AdminNotificationService { /* private fields */ }Expand description
Admin notification service
Implementations§
Source§impl AdminNotificationService
impl AdminNotificationService
Sourcepub fn with_large_tx_threshold(self, threshold_sats: u64) -> Self
pub fn with_large_tx_threshold(self, threshold_sats: u64) -> Self
Set the large transaction threshold
Sourcepub fn subscribe(&self) -> Receiver<AdminNotification>
pub fn subscribe(&self) -> Receiver<AdminNotification>
Subscribe to notifications
Sourcepub async fn notify(&self, notification: AdminNotification)
pub async fn notify(&self, notification: AdminNotification)
Send a notification
Sourcepub async fn notify_underpayment(
&self,
order_id: &str,
txid: &str,
expected_sats: u64,
received_sats: u64,
address: &str,
refund_address: Option<String>,
)
pub async fn notify_underpayment( &self, order_id: &str, txid: &str, expected_sats: u64, received_sats: u64, address: &str, refund_address: Option<String>, )
Notify about underpayment
Sourcepub async fn notify_overpayment(
&self,
order_id: &str,
txid: &str,
expected_sats: u64,
received_sats: u64,
address: &str,
refund_address: Option<String>,
)
pub async fn notify_overpayment( &self, order_id: &str, txid: &str, expected_sats: u64, received_sats: u64, address: &str, refund_address: Option<String>, )
Notify about overpayment
Sourcepub async fn notify_rbf_replacement(
&self,
order_id: Option<&str>,
original_txid: &str,
replacement_txid: &str,
fee_increase: Option<u64>,
)
pub async fn notify_rbf_replacement( &self, order_id: Option<&str>, original_txid: &str, replacement_txid: &str, fee_increase: Option<u64>, )
Notify about RBF replacement
Sourcepub async fn check_large_transaction(
&self,
txid: &str,
amount_sats: u64,
address: &str,
order_id: Option<&str>,
)
pub async fn check_large_transaction( &self, txid: &str, amount_sats: u64, address: &str, order_id: Option<&str>, )
Notify about large transaction if above threshold
Sourcepub async fn get_recent(&self, limit: usize) -> Vec<AdminNotification>
pub async fn get_recent(&self, limit: usize) -> Vec<AdminNotification>
Get recent notifications
Sourcepub async fn get_unacknowledged(&self) -> Vec<AdminNotification>
pub async fn get_unacknowledged(&self) -> Vec<AdminNotification>
Get unacknowledged notifications
Sourcepub async fn get_by_category(
&self,
category: NotificationCategory,
) -> Vec<AdminNotification>
pub async fn get_by_category( &self, category: NotificationCategory, ) -> Vec<AdminNotification>
Get notifications by category
Sourcepub async fn get_by_priority(
&self,
min_priority: NotificationPriority,
) -> Vec<AdminNotification>
pub async fn get_by_priority( &self, min_priority: NotificationPriority, ) -> Vec<AdminNotification>
Get notifications by priority
Sourcepub async fn acknowledge(&self, notification_id: &str, admin_id: &str) -> bool
pub async fn acknowledge(&self, notification_id: &str, admin_id: &str) -> bool
Acknowledge a notification
Sourcepub async fn get_stats(&self) -> NotificationStats
pub async fn get_stats(&self) -> NotificationStats
Get notification statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AdminNotificationService
impl !RefUnwindSafe for AdminNotificationService
impl Send for AdminNotificationService
impl Sync for AdminNotificationService
impl Unpin for AdminNotificationService
impl !UnwindSafe for AdminNotificationService
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