more docs

This commit is contained in:
Dominik Maier 2021-05-05 14:32:47 +02:00 committed by Andrea Fioraldi
parent f96ae30059
commit 08a32c3856
7 changed files with 19 additions and 0 deletions

View File

@ -212,9 +212,12 @@ where
}
}
/// Allows prepending of values to a tuple
pub trait Prepend<T>: 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);
}
@ -230,9 +233,12 @@ where
}
}
/// Append to a `TupeList`
pub trait Append<T>: TupleList {
type AppendResult: TupleList;
/// Append Value and return the tuple
#[must_use]
fn append(self, value: T) -> Self::AppendResult;
}

View File

@ -15,6 +15,7 @@ use core::marker::PhantomData;
use hashbrown::{HashMap, HashSet};
use serde::{Deserialize, Serialize};
/// Default probability to skip the non-favored values
pub const DEFAULT_SKIP_NOT_FAV_PROB: u64 = 95;
/// A testcase metadata saying if a testcase is favored

View File

@ -53,6 +53,7 @@ where
C: Corpus<I>,
I: Input,
{
/// Creates a new `QueueCorpusScheduler`
pub fn new() -> Self {
Self {
phantom: PhantomData,

View File

@ -108,6 +108,7 @@ where
severity_level: LogSeverity,
/// The message
message: String,
/// `PhantomData`
phantom: PhantomData<I>,
},
/*/// A custom type

View File

@ -16,15 +16,21 @@ use crate::{
use alloc::boxed::Box;
/// A `CustomExitKind` for exits that do not fit the default `ExitKind`
pub trait CustomExitKind: core::fmt::Debug + SerdeAny + 'static {}
/// How an execution finished.
#[derive(Debug)]
pub enum ExitKind {
/// The run exited normally.
Ok,
/// The run resulted in a target crash.
Crash,
/// The run hit an out of memory error.
Oom,
/// The run timed out
Timeout,
/// The run resulted in a custom `ExitKind`.
Custom(Box<dyn CustomExitKind>),
}

View File

@ -54,6 +54,8 @@ where
E: Executor<I>,
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 {
Self {
executor,
@ -62,6 +64,7 @@ where
}
}
/// Retrieve the inner `Executor` that is wrapped by this `TimeoutExecutor`.
pub fn inner(&mut self) -> &mut E {
&mut self.executor
}

View File

@ -237,6 +237,7 @@ where
EM: EventManager<I, S>,
I: Input,
{
/// Create a new `StdFuzzer` with standard behavior.
pub fn new(stages: ST) -> Self {
Self {
stages,