use crate::{prelude::*, traits::IdType, traits::Property};
#[derive(Debug)]
pub enum SetOpsError<
LeftError: std::fmt::Debug,
RightError: std::fmt::Debug,
ResultError: std::fmt::Debug,
> {
Left(LeftError),
Right(RightError),
Result(ResultError),
}
pub trait TripleStoreSetOps<Id: IdType, NodeProps: Property, EdgeProps: Property>:
TripleStoreError
{
type SetOpsResult: TripleStore<Id, NodeProps, EdgeProps>;
type SetOpsResultError: std::fmt::Debug;
fn union<E: std::fmt::Debug>(
self,
other: impl TripleStoreIntoIter<Id, NodeProps, EdgeProps, Error = E>,
) -> Result<Self::SetOpsResult, SetOpsError<Self::Error, E, Self::SetOpsResultError>>;
fn intersection<E: std::fmt::Debug>(
self,
other: impl TripleStoreIntoIter<Id, NodeProps, EdgeProps, Error = E>,
) -> Result<Self::SetOpsResult, SetOpsError<Self::Error, E, Self::SetOpsResultError>>;
fn difference<E: std::fmt::Debug>(
self,
other: impl TripleStoreIntoIter<Id, NodeProps, EdgeProps, Error = E>,
) -> Result<Self::SetOpsResult, SetOpsError<Self::Error, E, Self::SetOpsResultError>>;
}