pub struct SqliteStorage { /* private fields */ }Expand description
SQLite storage backend. Each collection maps to a table; JSON fields are stored as TEXT columns and (de)serialized on write/read.
Implementations§
Trait Implementations§
Source§impl Storage for SqliteStorage
impl Storage for SqliteStorage
fn kind(&self) -> &str
Source§fn ping(&mut self) -> Result<bool>
fn ping(&mut self) -> Result<bool>
Verify connectivity (PocketBase health / SQLite open + query).
Source§fn ensure_schema(&mut self) -> Result<()>
fn ensure_schema(&mut self) -> Result<()>
Create all required collections/tables if they do not exist.
fn upsert_scan_run(&mut self, run: &ScanRun) -> Result<()>
fn get_scan_run(&mut self, run_id: &str) -> Result<Option<ScanRun>>
fn list_scan_runs(&mut self) -> Result<Vec<ScanRun>>
fn upsert_asset(&mut self, asset: &Asset) -> Result<()>
fn get_asset(&mut self, asset_id: &str) -> Result<Option<Asset>>
fn list_assets(&mut self) -> Result<Vec<Asset>>
fn upsert_service(&mut self, service: &Service) -> Result<()>
fn get_service(&mut self, service_id: &str) -> Result<Option<Service>>
fn list_services_for_asset(&mut self, asset_id: &str) -> Result<Vec<Service>>
fn list_all_services(&mut self) -> Result<Vec<Service>>
fn upsert_finding(&mut self, finding: &Finding) -> Result<()>
fn get_finding(&mut self, finding_id: &str) -> Result<Option<Finding>>
fn list_findings_for_asset(&mut self, asset_id: &str) -> Result<Vec<Finding>>
fn list_all_findings(&mut self) -> Result<Vec<Finding>>
fn add_observation(&mut self, observation: &Observation) -> Result<()>
fn get_observation(&mut self, obs_id: &str) -> Result<Option<Observation>>
fn list_observations_for( &mut self, subject_type: &str, subject_id: &str, ) -> Result<Vec<Observation>>
fn list_all_observations(&mut self) -> Result<Vec<Observation>>
Auto Trait Implementations§
impl !Freeze for SqliteStorage
impl !RefUnwindSafe for SqliteStorage
impl !Sync for SqliteStorage
impl !UnwindSafe for SqliteStorage
impl Send for SqliteStorage
impl Unpin for SqliteStorage
impl UnsafeUnpin for SqliteStorage
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