Skip to main content

FsReviewStore

Struct FsReviewStore 

Source
pub struct FsReviewStore { /* private fields */ }
Expand description

One review’s sidecar directory (ADR 0013).

Implementations§

Source§

impl FsReviewStore

Source

pub fn for_review<L: RepoLayout>( layout: &L, id: &str, ) -> Result<Self, EngineError>

Open the review with this id.

The id is review_identity::resolve’s answer, not this adapter’s: which review a spelling opens is domain policy, and it can be another spelling’s review.

Source

pub fn at(dir: PathBuf) -> Result<Self, EngineError>

Test/tooling entry: open at an explicit directory.

Trait Implementations§

Source§

impl ReviewStore for FsReviewStore

Source§

fn save_plan(&self, hash: &str, json: &str) -> Result<(), EngineError>

Persist a plan document under its content hash and point current at it. Idempotent: re-saving the same hash must not rewrite the body. Read more
Source§

fn load_state(&self) -> Result<ReviewState, EngineError>

Source§

fn save_state(&self, state: &ReviewState) -> Result<(), EngineError>

Source§

fn load_findings(&self) -> Result<Vec<Finding>, EngineError>

Source§

fn save_findings(&self, findings: &[Finding]) -> Result<(), EngineError>

Rewrites the whole set (status changes, deletions, re-anchor results). The set is small; simplicity beats cleverness.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.