pub struct CommitValidator { /* private fields */ }Expand description
Implementations§
Source§impl CommitValidator
impl CommitValidator
Sourcepub fn new(pool: SqlitePool) -> Self
pub fn new(pool: SqlitePool) -> Self
Creates a new validator backed by the given SQLite pool (source branch).
Sourcepub async fn from_branch(branch: &Branch) -> BranchResult<Self>
pub async fn from_branch(branch: &Branch) -> BranchResult<Self>
Opens a validator from a branch db_path.
Sourcepub async fn validate(
&self,
cherry: &CherryPick,
source: &Branch,
target: &Branch,
) -> BranchResult<ValidationReport>
pub async fn validate( &self, cherry: &CherryPick, source: &Branch, target: &Branch, ) -> BranchResult<ValidationReport>
Validates the cherry-pick against the source and target branches.
Checks performed:
- Source branch must be
ActiveorDormant - Target branch must be
Active - All specified entity ids must exist in the source database
- No obvious foreign-key invariant violations in the target
Auto Trait Implementations§
impl Freeze for CommitValidator
impl !RefUnwindSafe for CommitValidator
impl Send for CommitValidator
impl Sync for CommitValidator
impl Unpin for CommitValidator
impl UnsafeUnpin for CommitValidator
impl !UnwindSafe for CommitValidator
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> 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