Trait Unspecified

Source
pub trait Unspecified: Sized {
    // Required method
    fn is_unspecified(&self) -> bool;

    // Provided method
    fn filter_unspecified(self) -> Option<Self> { ... }
}
Expand description

A trait to determine if the value is left unspecified, usually containing the default value.

See: https://en.wikipedia.org/wiki/IPv6_address#Unspecified_address

Required Methods§

Source

fn is_unspecified(&self) -> bool

Returns true if the value is unspecified

Provided Methods§

Source

fn filter_unspecified(self) -> Option<Self>

Coerce a potentially unspecified value into an Option<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Unspecified for U16

Source§

impl Unspecified for U32

Source§

impl Unspecified for U64

Source§

impl Unspecified for U128

Implementors§