You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that portgraph's traits (PortView, LinkView) are implemented for graph objects themselves, whereas most petgraph traits (at least the ones I am using) are implemented for graph references.
Is there anything that prevents us from defining
impl<'a,G:PortView>PortViewfor&'aG{ ... }
within portgraph?
Whilst we are at it, are the following impls (among other) also possible?
Such impls would greatly simplify my generics and bounds.
I might not too confident yet about which trait impls are exactly allowed in Rust, so it might be that some of those are invalid.
EDIT: it might be slightly weird if e.g. IntoNodeIndices is defined both for graphs themselves and their references, as calling g.node_identifiers() would consume g in the absence of explicit casting... I changed the second code block to only implement IntoNodeIndices for refs.
The text was updated successfully, but these errors were encountered:
I noticed that
portgraph
's traits (PortView
,LinkView
) are implemented for graph objects themselves, whereas mostpetgraph
traits (at least the ones I am using) are implemented for graph references.Is there anything that prevents us from defining
within
portgraph
?Whilst we are at it, are the following impls (among other) also possible?
Such
impl
s would greatly simplify my generics and bounds.I might not too confident yet about which trait impls are exactly allowed in Rust, so it might be that some of those are invalid.
EDIT: it might be slightly weird if e.g.
IntoNodeIndices
is defined both for graphs themselves and their references, as callingg.node_identifiers()
would consumeg
in the absence of explicit casting... I changed the second code block to only implementIntoNodeIndices
for refs.The text was updated successfully, but these errors were encountered: