1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
use crate::validators::models::Host;
use crate::validators::prelude::*;

#[derive(Debug, Clone, PartialEq, Eq, Hash, Validator)]
#[validator(host(port(NotAllow)))]
pub struct Target(pub(crate) Host);

impl Target {
    #[allow(clippy::missing_safety_doc)]
    #[inline]
    pub const unsafe fn from_host_unchecked(host: Host) -> Target {
        Target(host)
    }
}