use crate::{
prelude::*,
traits::{IdType, Property},
EdgeOrder, PropsTriple, Triple,
};
pub trait TripleStoreIter<Id: IdType, NodeProps: Property, EdgeProps: Property>:
TripleStoreError
{
fn vertices(&self) -> Result<impl Iterator<Item = Id>, Self::Error>;
fn iter_nodes(
&self,
order: EdgeOrder,
) -> (
impl Iterator<Item = Result<(Id, NodeProps), Self::Error>>,
impl Iterator<Item = Result<(Triple<Id>, EdgeProps), Self::Error>>,
);
fn iter_vertices<'a>(
&'a self,
) -> impl Iterator<Item = Result<(Id, NodeProps), Self::Error>> + 'a;
fn iter_edges_with_props<'a>(
&'a self,
order: EdgeOrder,
) -> impl Iterator<Item = Result<PropsTriple<Id, NodeProps, EdgeProps>, Self::Error>> + 'a;
fn iter_edges<'a>(
&'a self,
order: EdgeOrder,
) -> impl Iterator<Item = Result<(Triple<Id>, EdgeProps), Self::Error>> + 'a;
}