use-tcp 0.1.0

TCP endpoint parsing and common TCP service helpers for RustUse.
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented1 out of 7 items with examples
  • Size
  • Source code size: 7.34 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 335.74 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • RustUse/use-net
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-tcp

use-tcp provides small helpers for parsing TCP-style endpoints and looking up a few common TCP service ports.

Experimental: this crate is below 0.3.0 and the API may change.

Example Usage

use use_tcp::{default_tcp_port, format_tcp_endpoint, parse_tcp_endpoint};

let endpoint = parse_tcp_endpoint("example.com:443").unwrap();

assert_eq!(endpoint.port, 443);
assert_eq!(default_tcp_port("https"), Some(443));
assert_eq!(format_tcp_endpoint(&endpoint), "example.com:443");

Scope

  • Parsing and formatting TCP-style host-and-port endpoints.
  • Small common TCP service mappings.

Non-goals

  • TCP connections.
  • TCP listeners.
  • Stream handling.
  • TLS.

License

Licensed under MIT OR Apache-2.0.