hostname

Macro hostname 

Source
macro_rules! hostname {
    ($s:expr) => { ... };
}
Expand description

Creates a Hostname from a string literal or expression.

This macro panics if the hostname is invalid, making it suitable for use with known-valid hostnames in tests or configuration.

§Examples

use commonware_utils::hostname;

let h1 = hostname!("example.com");
let h2 = hostname!("sub.domain.example.com");

§Panics

Panics if the provided string is not a valid hostname according to RFC 1035/1123.