pub struct PayloadClass(pub String);Expand description
The attack-class dimension of the MAP-Elites grid.
Derived from the payload content (or from the bench case’s class field
if the caller has it). Comparison is case-insensitive; values are stored
as lower-case canonical strings so cells are stable across equivalent
representations.
Tuple Fields§
§0: StringImplementations§
Source§impl PayloadClass
impl PayloadClass
Sourcepub fn new(raw: &str) -> Self
pub fn new(raw: &str) -> Self
Construct from an arbitrary string. The value is lower-cased and stripped of leading/trailing whitespace so grid cells are stable.
Sourcepub fn from_payload(payload: &str) -> Self
pub fn from_payload(payload: &str) -> Self
Classify a raw payload string heuristically.
The classifier is intentionally lightweight — it looks for the strongest textual signal in the payload rather than doing full parse-tree analysis. The categories match the wafrift bench corpus class identifiers so coverage reports are directly comparable.
Trait Implementations§
Source§impl Clone for PayloadClass
impl Clone for PayloadClass
Source§fn clone(&self) -> PayloadClass
fn clone(&self) -> PayloadClass
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 PayloadClass
impl Debug for PayloadClass
Source§impl<'de> Deserialize<'de> for PayloadClass
impl<'de> Deserialize<'de> for PayloadClass
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
impl Eq for PayloadClass
Source§impl Hash for PayloadClass
impl Hash for PayloadClass
Source§impl Ord for PayloadClass
impl Ord for PayloadClass
Source§fn cmp(&self, other: &PayloadClass) -> Ordering
fn cmp(&self, other: &PayloadClass) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PayloadClass
impl PartialEq for PayloadClass
Source§fn eq(&self, other: &PayloadClass) -> bool
fn eq(&self, other: &PayloadClass) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PayloadClass
impl PartialOrd for PayloadClass
Source§impl Serialize for PayloadClass
impl Serialize for PayloadClass
impl StructuralPartialEq for PayloadClass
Auto Trait Implementations§
impl Freeze for PayloadClass
impl RefUnwindSafe for PayloadClass
impl Send for PayloadClass
impl Sync for PayloadClass
impl Unpin for PayloadClass
impl UnsafeUnpin for PayloadClass
impl UnwindSafe for PayloadClass
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.