Skip to content

Dynamic endpoints / bridge support #200

Answered by ivmarkov
cmair asked this question in Q&A
Discussion options

You must be logged in to vote

Also something I've missed as I do t get notifications for the q&a section... sorry!

Dynamic support is completely supported and baked-in! In fact, that's what I use in my own project.

You just need to implement the Node trait on top of some Vec, like either heapless::Vec or - if you are OK with allocations - on top of alloc:vec::Vec and then serve with it a bunch of Endpoint<'static> instances.

The catch a bit is that you cannot really change your dynamic Node layout while you are serving requests with your async handler. You have to wrap it with an async rw lock or mutex and then only change it when you are able to lock it - I.e. between two requests.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kedars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants