use alloc::{rc::Rc, string::ToString};
use crate::shared::{ArrowShape, LineStyle};
pub trait EdgeBuilder: Sized {
type Edge;
type Node;
type Error;
fn build(self) -> Result<Self::Edge, Self::Error>;
fn label<S: ToString>(self, label: S) -> Result<Self, Self::Error>;
fn source(self, node: Rc<Self::Node>) -> Result<Self, Self::Error>;
fn destination(self, node: Rc<Self::Node>) -> Result<Self, Self::Error>;
#[must_use]
fn line_style(self, style: LineStyle) -> Self;
fn left_arrow_shape(self, shape: ArrowShape) -> Result<Self, Self::Error>;
fn right_arrow_shape(self, shape: ArrowShape) -> Result<Self, Self::Error>;
}