pub struct BenchmarkSample {
pub id: String,
pub text: String,
pub is_attack: bool,
pub category: Option<String>,
pub subcategory: Option<String>,
pub source: String,
pub metadata: HashMap<String, String>,
}Expand description
A benchmark sample with ground truth label
Fields§
§id: StringUnique identifier
text: StringThe input text/prompt
is_attack: boolGround truth: true if this is an attack, false if benign
category: Option<String>Attack category (if applicable)
subcategory: Option<String>Subcategory or attack type
source: StringSource dataset
metadata: HashMap<String, String>Additional metadata
Trait Implementations§
Source§impl Clone for BenchmarkSample
impl Clone for BenchmarkSample
Source§fn clone(&self) -> BenchmarkSample
fn clone(&self) -> BenchmarkSample
Returns a duplicate of the value. Read more
1.0.0 · 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 BenchmarkSample
impl Debug for BenchmarkSample
Source§impl<'de> Deserialize<'de> for BenchmarkSample
impl<'de> Deserialize<'de> for BenchmarkSample
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 BenchmarkSample
impl RefUnwindSafe for BenchmarkSample
impl Send for BenchmarkSample
impl Sync for BenchmarkSample
impl Unpin for BenchmarkSample
impl UnwindSafe for BenchmarkSample
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