more docs
This commit is contained in:
parent
f96ae30059
commit
08a32c3856
@ -212,9 +212,12 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Allows prepending of values to a tuple
|
||||||
pub trait Prepend<T>: TupleList {
|
pub trait Prepend<T>: TupleList {
|
||||||
type PreprendResult: TupleList;
|
type PreprendResult: TupleList;
|
||||||
|
|
||||||
|
/// Prepend a value to this tuple, returning a new tuple with prepended value.
|
||||||
|
#[must_use]
|
||||||
fn prepend(self, value: T) -> (T, Self::PreprendResult);
|
fn prepend(self, value: T) -> (T, Self::PreprendResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,9 +233,12 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Append to a `TupeList`
|
||||||
pub trait Append<T>: TupleList {
|
pub trait Append<T>: TupleList {
|
||||||
type AppendResult: TupleList;
|
type AppendResult: TupleList;
|
||||||
|
|
||||||
|
/// Append Value and return the tuple
|
||||||
|
#[must_use]
|
||||||
fn append(self, value: T) -> Self::AppendResult;
|
fn append(self, value: T) -> Self::AppendResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ use core::marker::PhantomData;
|
|||||||
use hashbrown::{HashMap, HashSet};
|
use hashbrown::{HashMap, HashSet};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
/// Default probability to skip the non-favored values
|
||||||
pub const DEFAULT_SKIP_NOT_FAV_PROB: u64 = 95;
|
pub const DEFAULT_SKIP_NOT_FAV_PROB: u64 = 95;
|
||||||
|
|
||||||
/// A testcase metadata saying if a testcase is favored
|
/// A testcase metadata saying if a testcase is favored
|
||||||
|
@ -53,6 +53,7 @@ where
|
|||||||
C: Corpus<I>,
|
C: Corpus<I>,
|
||||||
I: Input,
|
I: Input,
|
||||||
{
|
{
|
||||||
|
/// Creates a new `QueueCorpusScheduler`
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
phantom: PhantomData,
|
phantom: PhantomData,
|
||||||
|
@ -108,6 +108,7 @@ where
|
|||||||
severity_level: LogSeverity,
|
severity_level: LogSeverity,
|
||||||
/// The message
|
/// The message
|
||||||
message: String,
|
message: String,
|
||||||
|
/// `PhantomData`
|
||||||
phantom: PhantomData<I>,
|
phantom: PhantomData<I>,
|
||||||
},
|
},
|
||||||
/*/// A custom type
|
/*/// A custom type
|
||||||
|
@ -16,15 +16,21 @@ use crate::{
|
|||||||
|
|
||||||
use alloc::boxed::Box;
|
use alloc::boxed::Box;
|
||||||
|
|
||||||
|
/// A `CustomExitKind` for exits that do not fit the default `ExitKind`
|
||||||
pub trait CustomExitKind: core::fmt::Debug + SerdeAny + 'static {}
|
pub trait CustomExitKind: core::fmt::Debug + SerdeAny + 'static {}
|
||||||
|
|
||||||
/// How an execution finished.
|
/// How an execution finished.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum ExitKind {
|
pub enum ExitKind {
|
||||||
|
/// The run exited normally.
|
||||||
Ok,
|
Ok,
|
||||||
|
/// The run resulted in a target crash.
|
||||||
Crash,
|
Crash,
|
||||||
|
/// The run hit an out of memory error.
|
||||||
Oom,
|
Oom,
|
||||||
|
/// The run timed out
|
||||||
Timeout,
|
Timeout,
|
||||||
|
/// The run resulted in a custom `ExitKind`.
|
||||||
Custom(Box<dyn CustomExitKind>),
|
Custom(Box<dyn CustomExitKind>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ where
|
|||||||
E: Executor<I>,
|
E: Executor<I>,
|
||||||
I: Input,
|
I: Input,
|
||||||
{
|
{
|
||||||
|
/// Create a new `TimeoutExecutor`, wrapping the given `executor` and checking for timeouts.
|
||||||
|
/// This should usually be used for `InProcess` fuzzing.
|
||||||
pub fn new(executor: E, exec_tmout: Duration) -> Self {
|
pub fn new(executor: E, exec_tmout: Duration) -> Self {
|
||||||
Self {
|
Self {
|
||||||
executor,
|
executor,
|
||||||
@ -62,6 +64,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Retrieve the inner `Executor` that is wrapped by this `TimeoutExecutor`.
|
||||||
pub fn inner(&mut self) -> &mut E {
|
pub fn inner(&mut self) -> &mut E {
|
||||||
&mut self.executor
|
&mut self.executor
|
||||||
}
|
}
|
||||||
|
@ -237,6 +237,7 @@ where
|
|||||||
EM: EventManager<I, S>,
|
EM: EventManager<I, S>,
|
||||||
I: Input,
|
I: Input,
|
||||||
{
|
{
|
||||||
|
/// Create a new `StdFuzzer` with standard behavior.
|
||||||
pub fn new(stages: ST) -> Self {
|
pub fn new(stages: ST) -> Self {
|
||||||
Self {
|
Self {
|
||||||
stages,
|
stages,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user