stun_rs::attributes::turn

Type Alias IcmpType

source
pub type IcmpType = BoundedU8<0, 127>;
Expand description

This type represents the value of the ICMP type. Its interpretation depends on whether the ICMP was received over IPv4 or IPv6. Valid values are in the range from 0 to 127.

§Examples

// Use maximum value
let icmp_type = IcmpType::new(127);
assert!(icmp_type.is_some());

// Use minimum value
let icmp_type = IcmpType::new(0);
assert!(icmp_type.is_some());

// Use out of range value
let icmp_type = IcmpType::new(128);
assert!(icmp_type.is_none());

Aliased Type§

struct IcmpType(/* private fields */);