I am new to rust and hence also to Neli.
I am reading netlink messages using Tokio and the async API.
To do this, I call the next function on NlRouterReceiverHandle and it gives a return value with type:
Option<Result<Nlmsghdr<GenlId, Genlmsghdr<Cmd, Attr>>, RouterError<GenlId, Genlmsghdr<Cmd, Attr>>>>
I would like to take the RouterError and convert it to a more generic Box<dyn Error> that I can return back from my library. However, that does not seem to be possible. I get errors like:
the parameter type `Cmd` may not live long enough
the parameter type `Attr` may not live long enough
Any hints on what I should do? I would imagine it is best practice that an error can be converted to a Box<dyn Error>? perhaps there is potential for improvements to Neli?
I am new to rust and hence also to Neli.
I am reading netlink messages using Tokio and the async API.
To do this, I call the
nextfunction onNlRouterReceiverHandleand it gives a return value with type:I would like to take the
RouterErrorand convert it to a more genericBox<dyn Error>that I can return back from my library. However, that does not seem to be possible. I get errors like:Any hints on what I should do? I would imagine it is best practice that an error can be converted to a
Box<dyn Error>? perhaps there is potential for improvements to Neli?