pub struct MaskStore { /* private fields */ }Expand description
Mask store with rating system and disk persistence
Implementations§
Source§impl MaskStore
impl MaskStore
Sourcepub fn new(catalog: Arc<MaskCatalog>, storage_dir: PathBuf) -> Self
pub fn new(catalog: Arc<MaskCatalog>, storage_dir: PathBuf) -> Self
Create a new mask store
Sourcepub fn register_in_catalog(&self, mask_id: &str) -> Result<()>
pub fn register_in_catalog(&self, mask_id: &str) -> Result<()>
Register mask in the gateway catalog
Sourcepub fn record_usage(&self, mask_id: &str)
pub fn record_usage(&self, mask_id: &str)
Record successful usage of a mask
Sourcepub fn record_failure(&self, mask_id: &str)
pub fn record_failure(&self, mask_id: &str)
Record a failure (DPI block detected)
Sourcepub fn list_masks(&self) -> Vec<MaskEntry>
pub fn list_masks(&self) -> Vec<MaskEntry>
List all masks with their stats
Sourcepub fn delete_mask(&self, mask_id: &str)
pub fn delete_mask(&self, mask_id: &str)
Delete a mask
Sourcepub async fn broadcast_mask_update(&self, mask_id: &str) -> Result<()>
pub async fn broadcast_mask_update(&self, mask_id: &str) -> Result<()>
Broadcast mask update to all connected clients (placeholder)
Auto Trait Implementations§
impl !RefUnwindSafe for MaskStore
impl !UnwindSafe for MaskStore
impl Freeze for MaskStore
impl Send for MaskStore
impl Sync for MaskStore
impl Unpin for MaskStore
impl UnsafeUnpin for MaskStore
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