-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
This issue tracks all rust features that are blocking further progress on this crate.
Equality constraints on associated constants
This will allow directeness to be an associated constant instead of the the current trait+structs API:
// Trait definition
trait Graph{
...
const DIRECTED: bool;
...
}
// Impl example:
impl Graph for Struct{
...
const DIRECTED: bool = true;
...
}
// Trait bounds
fn func<G: Graph<DIRECTED=true>>(g: &G){...}
// Usage
fn directed<G: Graph>(g: &G) -> bool {
G::DIRECTED
}type_alias_impl_trait & generic_associated_types
This would allow the result types of most Graph methods to be impl Iterator, such that implementors can use whatever implementation they want.
To achieve this currently we are using Box<Iterator> as return types which is inefficient.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels