#bind #ip-address #integration #unix-socket #server #tcp #abstraction

bindable

An abstraction over an address that a server can bind to: either an IP address for TCP or a path for a Unix socket

3 releases

0.1.2 May 11, 2022
0.1.1 Apr 20, 2022
0.1.0 Apr 19, 2022

#37 in #bind


Used in dexr

MIT/Apache

7KB
91 lines

Bindable

This crate provides the BindableAddr type, which is an abstraction over an address that a server can bind to: either an IP address for TCP or a path for a Unix socket.

There is also a BindBindableExt trait, that is used for server integrations.

The crate also includes some integrations with other common crates, gated by features.

Features

with-serde (enabled by default)

Implements Serialize and Deserialize for BindableAddr. The serialized representation is a string with an optional (defaults to TCP) protocol prefix, such as tcp:// or unix://.

with-actix

Implements BindBindableExt for HttpServer.

License

Licensed under either of Apache License, Version 2.0 or MIT license, at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.2–10MB
~120K SLoC