pub struct Store { /* private fields */ }Expand description
Connected, migrated SQLite store. Cloning is cheap (pool is Arc).
Implementations§
Source§impl Store
impl Store
Sourcepub async fn open(state_dir: &Path) -> Result<Self, StoreError>
pub async fn open(state_dir: &Path) -> Result<Self, StoreError>
Open <state_dir>/state.db, creating the file if missing, and
apply every migration shipped under migrations/.
Sourcepub async fn open_at(path: &Path) -> Result<Self, StoreError>
pub async fn open_at(path: &Path) -> Result<Self, StoreError>
Open an arbitrary SQLite file. Used by tests against a tempdir.
pub fn pool(&self) -> &SqlitePool
pub fn path(&self) -> &Path
pub async fn close(self)
Sourcepub async fn schema_version(&self) -> Result<i64, StoreError>
pub async fn schema_version(&self) -> Result<i64, StoreError>
Current applied schema version. Reads meta.schema_version, which
is kept in sync with MAX(_sqlx_migrations.version) on every
open via populate_meta. In debug builds the two are
cross-checked; in release the meta row is authoritative.
pub fn projects(&self) -> ProjectStore<'_>
pub fn repos(&self) -> RepoStore<'_>
pub fn runs(&self) -> RunStore<'_>
pub fn attack_graph(&self) -> AttackGraphStore<'_>
pub fn exploration_memory(&self) -> ExplorationMemoryStore<'_>
pub fn run_repo_outcomes(&self) -> RunRepoOutcomeStore<'_>
pub fn findings(&self) -> FindingStore<'_>
pub fn integrations(&self) -> ProjectIntegrationStore<'_>
pub fn chains(&self) -> ChainStore<'_>
pub fn payloads(&self) -> PayloadStore<'_>
pub fn launch_profiles(&self) -> LaunchProfileStore<'_>
pub fn environment_runs(&self) -> EnvironmentRunStore<'_>
pub fn nyx_signals(&self) -> NyxSignalStore<'_>
pub fn pentest_candidates(&self) -> PentestCandidateStore<'_>
pub fn business_logic_template_runs(&self) -> BusinessLogicTemplateRunStore<'_>
pub fn verification_attempts(&self) -> VerificationAttemptStore<'_>
pub fn authz_matrix(&self) -> AuthzMatrixStore<'_>
pub fn verified_vulnerabilities(&self) -> VerifiedVulnerabilityStore<'_>
pub fn route_models(&self) -> RouteModelStore<'_>
pub fn candidate_findings(&self) -> CandidateFindingStore<'_>
pub fn agent_traces(&self) -> AgentTraceStore<'_>
pub fn budgets(&self) -> BudgetStore<'_>
pub fn repro_bundles(&self) -> ReproBundleStore<'_>
pub fn schedules(&self) -> ScheduleStore<'_>
pub fn webhooks(&self) -> WebhookStore<'_>
pub fn feedback(&self) -> FeedbackStore<'_>
pub fn harness_specs(&self) -> HarnessSpecStore<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl !RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl !UnwindSafe for Store
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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