Skip to main content

AssertionSlot

Struct AssertionSlot 

Source
#[repr(C)]
pub struct AssertionSlot { pub msg_hash: u32, pub kind: u8, pub must_hit: u8, pub maximize: u8, pub split_triggered: u8, pub pass_count: u64, pub fail_count: u64, pub watermark: i64, pub split_watermark: i64, pub frontier: u8, pub _pad: [u8; 7], pub msg: [u8; 64], }
Expand description

A single assertion tracking slot in shared memory.

All fields are accessed via raw pointer arithmetic on MAP_SHARED memory.

Fields§

§msg_hash: u32

FNV-1a hash of the assertion message (u32).

§kind: u8

The kind of assertion (AssertKind as u8).

§must_hit: u8

Whether this assertion must be hit (1) or not (0).

§maximize: u8

Whether to maximize (1) or minimize (0) the watermark value.

§split_triggered: u8

Whether a fork has been triggered for this assertion (0 = no, 1 = yes).

§pass_count: u64

Total number of times this assertion passed.

§fail_count: u64

Total number of times this assertion failed.

§watermark: i64

Numeric watermark: best value observed (for guidance assertions).

§split_watermark: i64

Watermark value at last fork (for detecting improvement).

§frontier: u8

Frontier: number of simultaneously true bools (for BooleanSometimesAll).

§_pad: [u8; 7]

Padding for alignment.

§msg: [u8; 64]

Assertion message string (null-terminated).

Implementations§

Source§

impl AssertionSlot

Source

pub fn msg_str(&self) -> &str

Get the assertion message as a string slice.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.