pub struct Names { /* private fields */ }Expand description
The hosts a handshake may name, compared the way a name is compared.
Held as normalised strings — lowercased and with a trailing root dot removed
— so that the normalisation happens once at load rather than once per
Initial packet, and so that both gates (Names::accepts here and the
certificate resolver in crate::tls) can only ever agree.
Implementations§
Source§impl Names
impl Names
Sourcepub fn accepts(&self, name: &str) -> bool
pub fn accepts(&self, name: &str) -> bool
Whether name is one of them.
DNS names are case-insensitive and a trailing dot is the same name spelled absolutely, so both are normalised away on each side — the held side at load, this side without an allocation, since the held names are already lowercase. Nothing else is: no wildcards, no suffix matching. A name that is not on the list is not this server’s.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Names
impl RefUnwindSafe for Names
impl Send for Names
impl Sync for Names
impl Unpin for Names
impl UnsafeUnpin for Names
impl UnwindSafe for Names
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more