pub struct LookAheadGuard { /* private fields */ }Expand description
Guards against accessing future data
Implementations§
Source§impl LookAheadGuard
impl LookAheadGuard
pub fn new(mode: DataAccessMode, strict_mode: bool) -> Self
Sourcepub fn set_current_time(&self, time: DateTime<Utc>)
pub fn set_current_time(&self, time: DateTime<Utc>)
Set the current processing time
Sourcepub fn check_access(
&self,
access_time: DateTime<Utc>,
access_type: &str,
) -> Result<()>
pub fn check_access( &self, access_time: DateTime<Utc>, access_type: &str, ) -> Result<()>
Check if accessing data at a specific time is allowed
Sourcepub fn check_row_index(&self, index: i32, _access_type: &str) -> Result<()>
pub fn check_row_index(&self, index: i32, _access_type: &str) -> Result<()>
Check if accessing a row index is allowed
Sourcepub fn get_access_log(&self) -> Vec<DataAccess>
pub fn get_access_log(&self) -> Vec<DataAccess>
Get access log for auditing
Sourcepub fn get_violation_summary(&self) -> LookAheadSummary
pub fn get_violation_summary(&self) -> LookAheadSummary
Get summary of violations
Trait Implementations§
Source§impl Clone for LookAheadGuard
impl Clone for LookAheadGuard
Auto Trait Implementations§
impl !Freeze for LookAheadGuard
impl RefUnwindSafe for LookAheadGuard
impl Send for LookAheadGuard
impl Sync for LookAheadGuard
impl Unpin for LookAheadGuard
impl UnsafeUnpin for LookAheadGuard
impl UnwindSafe for LookAheadGuard
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