-
Notifications
You must be signed in to change notification settings - Fork 4
Add stage ids for DynPipeline
and ability to retrieve stages with concrete type
#320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3c181d6
to
0e6bc46
Compare
I'm going to try to use the Also, I forgot to add docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hoping to figure out how to get the compiler to tell me the concrete type name so that I can stash that separately, so there is no need for additional info. Haven't gotten around to that yet though. |
Getting the name of a type is not difficult (https://doc.rust-lang.org/beta/std/any/fn.type_name.html , though you cannot rely on it as an id). I did not mean the name of the type but the name of the instance. The NF type may be informative, but you may have several NFs of the same type in the same pipeline (FWs, Nat, Routing), so IMO, what is most informative is the instance name. The type name should be easy to get once you downcast, right ? |
I don't think there is any reason to force the NetworkFunction to have an instance name, that is why I went with the id when it is put in the pipeline. The Pipeline owns the stage and you find it by id. It is always possible to implement stages that have instance names, but I'm not sure if it should be required. |
I believe there is a use case for that:
No big deal if we don't want to have this introspection. But if we do .... |
We'll get the ability to have nice user-readable names once I am done with this thing, just have to figure out how to deal with the restrictions on Borrow. Annoyingly, the lifetime of the borrowed key type has to be the same as the actual key, which causes a problem in my current implementation. The Rust discord had no responses, so @daniel-noland will brainstorm a solution today, I hope. |
0e6bc46
to
300973e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
300973e
to
31505cd
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
db25bcc
to
0afce3e
Compare
So the Still need docs. |
|
Signed-off-by: Manish Vachharajani <[email protected]>
Signed-off-by: Manish Vachharajani <[email protected]>
Signed-off-by: Manish Vachharajani <[email protected]>
0afce3e
to
f1f57ab
Compare
|
Signed-off-by: Manish Vachharajani <[email protected]>
f1f57ab
to
54226b3
Compare
|
No description provided.