pub struct DeployHistoryStore {
pub dir: PathBuf,
}Fields§
§dir: PathBufImplementations§
Source§impl DeployHistoryStore
impl DeployHistoryStore
pub fn new(dir: impl Into<PathBuf>) -> Self
pub fn index_path(&self) -> PathBuf
pub fn load_index(&self) -> Result<DeployHistoryIndex>
Sourcepub fn rebuild_index_from_records(&self) -> Result<DeployHistoryIndex>
pub fn rebuild_index_from_records(&self) -> Result<DeployHistoryIndex>
Rebuild index.json solely from *.json attempt records on disk.
Sourcepub fn scan_record_entries(&self) -> Result<Vec<HistoryEntry>>
pub fn scan_record_entries(&self) -> Result<Vec<HistoryEntry>>
Scan deployment attempt files (excludes index.json and revitalized sidecars).
pub fn write_record(&self, record: &DeployHistoryRecord) -> Result<PathBuf>
Sourcepub fn stats(
&self,
target: &str,
env: &str,
limit: usize,
) -> Result<DeployHistoryStats>
pub fn stats( &self, target: &str, env: &str, limit: usize, ) -> Result<DeployHistoryStats>
Aggregate counts by error_code (falls back to classifying free-text for older records).
pub fn latest_status( &self, target: &str, env: &str, ) -> Result<Option<HistoryEntry>>
pub fn list( &self, target: &str, env: &str, limit: usize, ) -> Result<Vec<HistoryEntry>>
Sourcepub fn load_record(
&self,
entry: &HistoryEntry,
) -> Result<Option<DeployHistoryRecord>>
pub fn load_record( &self, entry: &HistoryEntry, ) -> Result<Option<DeployHistoryRecord>>
Load a full history JSON record by index entry (relative path or id).
Sourcepub fn load_record_by_id(&self, id: &str) -> Result<Option<DeployHistoryRecord>>
pub fn load_record_by_id(&self, id: &str) -> Result<Option<DeployHistoryRecord>>
Load by deployment id (filename without .json or full id).
pub fn record_path(&self, id: &str) -> PathBuf
Auto Trait Implementations§
impl Freeze for DeployHistoryStore
impl RefUnwindSafe for DeployHistoryStore
impl Send for DeployHistoryStore
impl Sync for DeployHistoryStore
impl Unpin for DeployHistoryStore
impl UnsafeUnpin for DeployHistoryStore
impl UnwindSafe for DeployHistoryStore
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