pub struct Sample {
pub name: &'static str,
pub csv: &'static [u8],
pub json: &'static [u8],
}Expand description
One corpus entry: a CSV input and the JSON its parse result should equal.
csv and json are raw bytes, stored verbatim. name is the shared base
name of the pair with no extension, for example "comma_in_quotes".
SAMPLES is sorted by unique name values. For that table, the derived
Ord implementation gives the same order because name decides every
comparison.
Fields§
§name: &'static strBase name shared by the CSV and JSON files, extension removed.
csv: &'static [u8]Raw bytes of the CSV input, unparsed.
json: &'static [u8]Raw bytes of the expected JSON parse result, unparsed.
Trait Implementations§
impl Copy for Sample
impl Eq for Sample
Source§impl Ord for Sample
impl Ord for Sample
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Sample
impl PartialOrd for Sample
impl StructuralPartialEq for Sample
Auto Trait Implementations§
impl Forget for Sample
impl Freeze for Sample
impl Move for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnsafeUnpin for Sample
impl UnwindSafe for Sample
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