pub struct DiffResult {
pub a_only: Vec<Quad>,
pub b_only: Vec<Quad>,
pub prefixes: Vec<(String, String)>,
pub graph_a: NamedNode,
pub graph_b: NamedNode,
pub stats: DiffStats,
pub source_a: Option<PathBuf>,
pub source_b: Option<PathBuf>,
pub format_a: Option<InputFormat>,
pub format_b: Option<InputFormat>,
pub quad_mode: bool,
}Expand description
Full result of a diff computation, kept in memory so it can be either serialized to disk or served from the web viewer.
a_only / b_only carry [Quad]s. In triple mode (quad_mode = false)
each quad’s graph component is the wrapper graph IRI (graph_a / graph_b)
and the diff is written as a single TriG/N-Quads document containing two
named graphs. In quad mode (at least one input is N-Quads or TriG)
the original graph names from the source are preserved and the diff is
emitted as two separate files (one per side).
Fields§
§a_only: Vec<Quad>§b_only: Vec<Quad>§prefixes: Vec<(String, String)>Merged prefix declarations from A and B. A wins on conflicts.
graph_a: NamedNode§graph_b: NamedNode§stats: DiffStats§source_a: Option<PathBuf>Source file paths, when known (used by the web viewer to lazily recompute the set of common triples).
source_b: Option<PathBuf>§format_a: Option<InputFormat>§format_b: Option<InputFormat>§quad_mode: boolImplementations§
Source§impl DiffResult
impl DiffResult
pub fn sort_rows(&mut self)
pub fn a_only_triples(&self) -> impl Iterator<Item = Triple> + '_
pub fn b_only_triples(&self) -> impl Iterator<Item = Triple> + '_
Trait Implementations§
Source§impl Clone for DiffResult
impl Clone for DiffResult
Source§fn clone(&self) -> DiffResult
fn clone(&self) -> DiffResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiffResult
impl RefUnwindSafe for DiffResult
impl Send for DiffResult
impl Sync for DiffResult
impl Unpin for DiffResult
impl UnsafeUnpin for DiffResult
impl UnwindSafe for DiffResult
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