pub(crate) fn is_public_suffix(domain: impl AsRef<str>) -> bool {
    let domain = domain.as_ref().as_bytes();

    with_cache(|cache| {
        // Check if the given domain is a public suffix.
        cache
            .list
            .suffix(domain)
            // We don't want to block unknown hosts like `localhost`
            .filter(publicsuffix::Suffix::is_known)
            .filter(|suffix| suffix == &domain)
            .is_some()
    })
}
/// Determine if the given domain is a public suffix.
///
/// If the current list information is stale, a background refresh will be
/// triggered. The current data will be used to respond to this query.
Determine if the given domain is a public suffix.
If the current list information is stale, a background refresh will be
triggered. The current data will be used to respond to this query.
Determine if the given domain is a public suffix . If the current list information is stale a background refresh will be triggered . The current data will be used to respond to this query .
pub(crate) fn is_public_suffix(domain: impl AsRef<str>) -> bool {
    let domain = domain.as_ref().as_bytes();
    with_cache(|cache| {
        // Check if the given domain is a public suffix.
        cache
            .list
            .suffix(domain)
            // We don't want to block unknown hosts like `localhost`
            .filter(publicsuffix::Suffix::is_known)
            .filter(|suffix| suffix == &domain)
            .is_some()
    })
}
pub ( crate ) fn is_public_suffix ( domain : impl AsRef < str > ) -> bool { let domain = domain . as_ref ( ) . as_bytes ( ) ; with_cache ( | cache | { // Check if the given domain is a public suffix. cache . list . suffix ( domain ) // We don't want to block unknown hosts like `localhost` . filter ( publicsuffix :: Suffix :: is_known ) . filter ( | suffix | suffix == & domain ) . is_some ( ) } ) }
Determine if the given domain is a public suffix.
Determine if the given domain is a public suffix .
domain
impl AsRef<str>