pub struct ServiceRule {
pub id: String,
pub service: String,
pub protocol: String,
pub common_ports: Vec<u16>,
pub patterns: Vec<String>,
pub version_pattern: Option<String>,
pub security_signals: Vec<String>,
pub priority: u8,
}Expand description
A single service classification rule.
Fields§
§id: StringUnique rule identifier (e.g., “http-apache”).
service: StringHuman-readable service name (e.g., “Apache HTTP Server”).
protocol: StringProtocol this rule applies to (tcp/udp).
common_ports: Vec<u16>Ports this rule commonly matches (hint, not filter).
patterns: Vec<String>Banner patterns to match (any match triggers the rule).
version_pattern: Option<String>Regex for version extraction (capture group 1 = version).
security_signals: Vec<String>Security signals this service may emit.
priority: u8Priority (higher = preferred when multiple rules match).
Trait Implementations§
Source§impl Clone for ServiceRule
impl Clone for ServiceRule
Source§fn clone(&self) -> ServiceRule
fn clone(&self) -> ServiceRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServiceRule
impl Debug for ServiceRule
Source§impl<'de> Deserialize<'de> for ServiceRule
impl<'de> Deserialize<'de> for ServiceRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ServiceRule
impl RefUnwindSafe for ServiceRule
impl Send for ServiceRule
impl Sync for ServiceRule
impl Unpin for ServiceRule
impl UnsafeUnpin for ServiceRule
impl UnwindSafe for ServiceRule
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