Skip to content

Blocking rust features #7

@Emoun

Description

@Emoun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions