pub struct DiffExtractor {
pub config: Arc<BranchConfig>,
}Expand description
Opens branch databases and computes entity-level diffs across the ClawDB schema.
Fields§
§config: Arc<BranchConfig>Configuration used for connection limits and timeouts.
Implementations§
Source§impl DiffExtractor
impl DiffExtractor
Sourcepub fn new(config: Arc<BranchConfig>) -> Self
pub fn new(config: Arc<BranchConfig>) -> Self
Creates a new extractor with the given workspace config.
Sourcepub async fn diff(
&self,
branch_a: &Branch,
branch_b: &Branch,
entity_types: Option<&[EntityType]>,
) -> BranchResult<DiffResult>
pub async fn diff( &self, branch_a: &Branch, branch_b: &Branch, entity_types: Option<&[EntityType]>, ) -> BranchResult<DiffResult>
Computes the full diff between branch_a and branch_b.
When entity_types is None, all three entity types are compared.
Sourcepub async fn diff_entity(
&self,
entity_id: &str,
entity_type: &EntityType,
pool_a: &SqlitePool,
pool_b: &SqlitePool,
) -> BranchResult<EntityDiff>
pub async fn diff_entity( &self, entity_id: &str, entity_type: &EntityType, pool_a: &SqlitePool, pool_b: &SqlitePool, ) -> BranchResult<EntityDiff>
Diffs a single named entity between two already-opened pools.
Auto Trait Implementations§
impl Freeze for DiffExtractor
impl RefUnwindSafe for DiffExtractor
impl Send for DiffExtractor
impl Sync for DiffExtractor
impl Unpin for DiffExtractor
impl UnsafeUnpin for DiffExtractor
impl UnwindSafe for DiffExtractor
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