Skip to main content

AuditLogNotificationSink

Trait AuditLogNotificationSink 

Source
pub trait AuditLogNotificationSink: Send + Sync {
    // Required methods
    fn notification_logging_enabled(&self) -> bool;
    fn store_notifications(
        &mut self,
        notifications: &[BACnetAuditNotification],
        apdu_timeout_ms: u32,
    ) -> Result<(), Error>;

    // Provided methods
    fn has_completed_confirmed_receipt(
        &self,
        _key: &[u8],
        _now_unix_millis: u64,
    ) -> Result<bool, Error> { ... }
    fn store_confirmed_notifications(
        &mut self,
        notifications: &[BACnetAuditNotification],
        apdu_timeout_ms: u32,
        _receipt: CompletedAuditReceipt,
    ) -> Result<ConfirmedAuditNotificationOutcome, Error> { ... }
}
Expand description

Mutable, object-owned receiver for one authorized Audit notification batch.

Implementations must commit the complete prospective state before exposing any in-memory change. The server uses this type-erased channel instead of downcasting an Audit Log object or taking ownership of its persistence.

Required Methods§

Source

fn notification_logging_enabled(&self) -> bool

Whether this sink currently accepts Audit notifications.

Source

fn store_notifications( &mut self, notifications: &[BACnetAuditNotification], apdu_timeout_ms: u32, ) -> Result<(), Error>

Merge or create every notification in wire order as one durable batch.

apdu_timeout_ms is the local Device object’s configured APDU_Timeout. It supplies the Clause 12.64 complementary timestamp window.

Provided Methods§

Source

fn has_completed_confirmed_receipt( &self, _key: &[u8], _now_unix_millis: u64, ) -> Result<bool, Error>

Check the durable completed-confirmed ledger without mutating it.

Source

fn store_confirmed_notifications( &mut self, notifications: &[BACnetAuditNotification], apdu_timeout_ms: u32, _receipt: CompletedAuditReceipt, ) -> Result<ConfirmedAuditNotificationOutcome, Error>

Atomically merge one confirmed batch and retain its completed receipt.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§