pub struct AllowedHostValidator { /* private fields */ }
Implementations§
Source§impl AllowedHostValidator
impl AllowedHostValidator
pub fn new(allowed_hosts: HashSet<Url>) -> AllowedHostValidator
pub fn validate_str(&self, url_str: &str) -> HostIs
pub fn validate_url(&self, url: &Url) -> HostIs
Trait Implementations§
Source§impl Clone for AllowedHostValidator
impl Clone for AllowedHostValidator
Source§fn clone(&self) -> AllowedHostValidator
fn clone(&self) -> AllowedHostValidator
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AllowedHostValidator
impl Debug for AllowedHostValidator
Source§impl Default for AllowedHostValidator
impl Default for AllowedHostValidator
Source§impl From<&[Url]> for AllowedHostValidator
impl From<&[Url]> for AllowedHostValidator
Source§impl ValidateHosts for AllowedHostValidator
impl ValidateHosts for AllowedHostValidator
fn validate_hosts(&self, valid_hosts: &[Url]) -> HostIs
Auto Trait Implementations§
impl Freeze for AllowedHostValidator
impl RefUnwindSafe for AllowedHostValidator
impl Send for AllowedHostValidator
impl Sync for AllowedHostValidator
impl Unpin for AllowedHostValidator
impl UnwindSafe for AllowedHostValidator
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