Macro graphene::custom_graph
[−]
[src]
macro_rules! custom_graph { { @as_associated $($rest:tt)* } => { ... }; { @in_struct $base_graph:ident<$V:ident, $W:ident> } => { ... }; { @in_struct $con_graph:ident,$base_graph:ident<$V:ident, $W:ident> >> $($rest:tt)* } => { ... }; { struct $graph_name:ident where $base_graph:ident } => { ... }; { struct $graph_name:ident where $base_graph:ident use $($con_graph:ident),* } => { ... }; { struct $graph_name:ident where $base_graph:ident impl $($con_trait:ident),* use $($con_graph:ident),* } => { ... }; }
A macro for defining a custom graph with a specific set of constraints.
The resulting graph is generic over vertices and weights (<V,W>) and implement
GraphWrapper
and the constraints given.
Syntax:
struct <graph name>
where <name of type implementing ConstrainedGraph>
impl (<constraint>),*
use (<GraphWrapper to use to uphold the constraint, i.e. will wrap the ConstrainedGraph>),*
The 'impl' and 'use' clauses are optional.