Expand description
Some useful functions
Modules§
- dns
- This module create a
DnsResolver
future task to DNS resolver
Enums§
- Transport
Type - Transport type on tentacle
Functions§
- extract_
peer_ id - Get peer id from multiaddr
- find_
type - Confirm the transport used by multiaddress
- is_
reachable - Check if the ip address is reachable. Copy from std::net::IpAddr::is_global
- multiaddr_
to_ socketaddr - Change multiaddr to socketaddr
- redact_
auth_ from_ url - Function to redact the username and password from a URL:
This function takes a URL of the form “https://user:password@example.com/path?key=value#hash”
and returns a modified version where the password is replaced with “”, resulting in:
“https://user:@example.com/path?key=value#hash”.
If the URL does not contain a username or password, it is returned unchanged.
Returns a
Cow<'_, Url>
to manage ownership efficiently, usingBorrowed
when possible. - socketaddr_
to_ multiaddr - convert socket address to multiaddr