leyline-http 0.1.5

HTTP client that impersonates Chrome, Firefox, and Safari on the wire: TLS (JA3/JA4), HTTP/2, and HTTP/3 fingerprints
Documentation
use std::fmt;

use super::Error;

#[derive(Debug)]
pub(crate) struct ProfileChanged;

impl fmt::Display for ProfileChanged {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.write_str("the session profile differs from the pinned profile")
    }
}

impl std::error::Error for ProfileChanged {}

impl Error {
    pub fn is_profile_changed(&self) -> bool {
        self.source_as::<ProfileChanged>().is_some()
    }
}