pub struct Audit;Expand description
Facade & Builder untuk Audit Trail Logging Lumina Framework
Implementations§
Source§impl Audit
impl Audit
Sourcepub fn record(pool: &DatabasePool) -> AuditRecordBuilder<'_>
pub fn record(pool: &DatabasePool) -> AuditRecordBuilder<'_>
Inisialisasi builder pencatatan log audit baru
Sourcepub async fn history(
pool: &DatabasePool,
auditable_type: &str,
auditable_id: i64,
) -> Result<Vec<AuditLog>, Error>
pub async fn history( pool: &DatabasePool, auditable_type: &str, auditable_id: i64, ) -> Result<Vec<AuditLog>, Error>
Ambil seluruh riwayat mutasi dari suatu entitas tertentu
Sourcepub async fn latest(
pool: &DatabasePool,
limit: i64,
) -> Result<Vec<AuditLog>, Error>
pub async fn latest( pool: &DatabasePool, limit: i64, ) -> Result<Vec<AuditLog>, Error>
Ambil daftar log mutasi audit terbaru secara global (berguna untuk Admin / Dashboard)
Sourcepub async fn ensure_table(pool: &DatabasePool) -> Result<(), Error>
pub async fn ensure_table(pool: &DatabasePool) -> Result<(), Error>
Buat tabel audit_logs secara otomatis jika belum ada di database
Auto Trait Implementations§
impl Forget for Audit
impl Freeze for Audit
impl Move for Audit
impl RefUnwindSafe for Audit
impl Send for Audit
impl Sync for Audit
impl Unpin for Audit
impl UnsafeUnpin for Audit
impl UnwindSafe for Audit
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more