pub type IcmpCode = BoundedU16<0, 511>;Expand description
This type represents the value of the ICMP code. Its interpretation
depends on whether the ICMP was received over IPv4 or IPv6.
Valid values are in the range from 0 to 511.
§Examples
// Use maximum value
let icmp_code = IcmpCode::new(511);
assert!(icmp_code.is_some());
// Use minimum value
let icmp_code = IcmpCode::new(0);
assert!(icmp_code.is_some());
// Use out of range value
let icmp_code = IcmpCode::new(512);
assert!(icmp_code.is_none());Aliased Type§
pub struct IcmpCode(/* private fields */);