lumeohq / onvif-rs

A native Rust ONVIF client library.
MIT License
114 stars 61 forks source link

Allow a pre-initalized HTTP client to be passed in the client builder #117

Closed SamuelYvon closed 9 months ago

SamuelYvon commented 9 months ago

This PR allows a user to re-use an HTTP client to back a soap client. This can be meaningful when trying limit the amount of outstanding connections taken by each client's connection pool.

I also modified the accessor of the auth module:

-pub(crate) mod digest;
-pub(crate) mod username_token;
+pub mod digest;
+pub mod username_token;

You cleverly allowed the transport to be a generic, so users are free to re-implement their client as they want, but not providing the auth crates mean they have to re-implement everything. This aims to make it a bit more flexible.