pub struct Graph { /* private fields */ }Implementations§
Source§impl Graph
impl Graph
pub fn new(vertices: Vec<GraphNode>) -> Self
pub fn to_edges(self) -> Vec<GraphEdge>
pub fn nodes(&self) -> &Vec<GraphNode>
pub fn to_nodes(self) -> Vec<GraphNode>
pub fn vertices(&self) -> &Vec<GraphNode>
pub fn neighbour_of( &self, node_name: &str, ) -> Result<Vec<&GraphEdge>, TransformError>
pub fn into_neighbours_of( self, node_name: &str, ) -> Result<Vec<GraphEdge>, TransformError>
Trait Implementations§
Source§impl ApplyOp for Graph
impl ApplyOp for Graph
type TargetType = PrimitiveKind
type Target = Primitive
type Error = OperatorError
fn apply_binary_op( &self, op: BinOp, _to: &Primitive, ) -> Result<Primitive, OperatorError>
fn apply_unary_op(&self, op: UnOp) -> Result<Self::Target, Self::Error>
fn can_apply_binary_op(_: BinOp, _: Self::TargetType) -> bool
fn can_apply_unary_op(_: UnOp) -> bool
Source§impl<'de> Deserialize<'de> for Graph
impl<'de> Deserialize<'de> for Graph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Spreadable for Graph
impl Spreadable for Graph
Source§fn to_primitive_set(self) -> Result<Vec<Primitive>, TransformError>
fn to_primitive_set(self) -> Result<Vec<Primitive>, TransformError>
Converts self into a vector of primitives. Read more
impl StructuralPartialEq for Graph
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more