I can not think of a reason why Client pub new couldn't be public.
With this change an user can full create a ResponseChannel, UrcChannel, Ingress and the Client by them self.
This allows doing something like that:
The advantage in that is we can create Ingress directly in a Box to avoid it coping from stack to heap when putting in a Box (as the compiler should hopeful optimize that out) and then when moving ingress around we can avoid doing more copy on move of ingress with might be not optimized out like when putting it into a task. A better solution for the future would be to allow putting a static buffer from outside Ingress but that will be a bigger rework and I think having Ingress::new public still isn't a bad idea, all other parts used by Buffers are already public anyway.
I can not think of a reason why Client pub new couldn't be public. With this change an user can full create a ResponseChannel, UrcChannel, Ingress and the Client by them self. This allows doing something like that:
The advantage in that is we can create Ingress directly in a Box to avoid it coping from stack to heap when putting in a Box (as the compiler should hopeful optimize that out) and then when moving ingress around we can avoid doing more copy on move of ingress with might be not optimized out like when putting it into a task. A better solution for the future would be to allow putting a static buffer from outside Ingress but that will be a bigger rework and I think having
Ingress::new
public still isn't a bad idea, all other parts used by Buffers are already public anyway.