rshyper_core/traits/
merge.rs

1/*
2    appellation: merge <module>
3    authors: @FL03
4*/
5
6/// [`Merge`] defines a common interface for _merging_ two entities into another
7pub trait Merge<Rhs = Self> {
8    type Output;
9
10    fn merge(self, rhs: Rhs) -> Self::Output;
11}
12
13/// [`Combine`] defines a common interface for merging two edges in a hypergraph.
14pub trait Combine<A, B> {
15    type Output;
16
17    fn combine(&mut self, src: A, tgt: B) -> crate::Result<Self::Output>;
18}