pub struct Signature {
pub version: Version,
pub horder: Vec<Header>,
pub habsent: Vec<Header>,
pub expsw: String,
}
Fields§
§version: Version
HTTP version
horder: Vec<Header>
ordered list of headers that should appear in matching traffic.
habsent: Vec<Header>
list of headers that must not appear in matching traffic.
expsw: String
expected substring in ‘User-Agent’ or ‘Server’.
Trait Implementations§
Source§impl DatabaseSignature<ObservableHttpRequest> for Signature
impl DatabaseSignature<ObservableHttpRequest> for Signature
Source§fn calculate_distance(&self, observed: &ObservableHttpRequest) -> Option<u32>
fn calculate_distance(&self, observed: &ObservableHttpRequest) -> Option<u32>
Calculates a distance or dissimilarity score. Lower is better.
Source§fn get_quality_score(&self, distance: u32) -> f32
fn get_quality_score(&self, distance: u32) -> f32
Returns the quality score based on the distance.
Source§fn generate_index_keys_for_db_entry(&self) -> Vec<HttpIndexKey>
fn generate_index_keys_for_db_entry(&self) -> Vec<HttpIndexKey>
Generates index keys from this database signature.
It’s a Vec because some DB signatures (like IpVersion::Any) might map to multiple keys.
The OptionOF::Key in the Vec allows for cases where a specific DB sig might not produce a key
for a certain specific version (e.g. an IpVersion::Any sig, when asked to produce a V4 key, will).
Source§impl DatabaseSignature<ObservableHttpResponse> for Signature
impl DatabaseSignature<ObservableHttpResponse> for Signature
Source§fn calculate_distance(&self, observed: &ObservableHttpResponse) -> Option<u32>
fn calculate_distance(&self, observed: &ObservableHttpResponse) -> Option<u32>
Calculates a distance or dissimilarity score. Lower is better.
Source§fn get_quality_score(&self, distance: u32) -> f32
fn get_quality_score(&self, distance: u32) -> f32
Returns the quality score based on the distance.
Source§fn generate_index_keys_for_db_entry(&self) -> Vec<HttpIndexKey>
fn generate_index_keys_for_db_entry(&self) -> Vec<HttpIndexKey>
Generates index keys from this database signature.
It’s a Vec because some DB signatures (like IpVersion::Any) might map to multiple keys.
The OptionOF::Key in the Vec allows for cases where a specific DB sig might not produce a key
for a certain specific version (e.g. an IpVersion::Any sig, when asked to produce a V4 key, will).
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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