Struct Tsffs

Source
#[repr(C)]
pub(crate) struct Tsffs {
Show 87 fields pub(crate) conf_object: ConfObject, pub all_breakpoints_are_solutions: bool, pub all_exceptions_are_solutions: bool, pub exceptions: BTreeSet<i64>, pub breakpoints: BTreeSet<BreakpointId>, pub timeout: f64, pub start_on_harness: bool, pub stop_on_harness: bool, pub magic_start_index: u64, pub magic_stop_indices: Vec<u64>, pub magic_assert_indices: Vec<u64>, pub iteration_limit: usize, pub initial_random_corpus_size: usize, pub corpus_directory: PathBuf, pub solutions_directory: PathBuf, pub generate_random_corpus: bool, pub cmplog: bool, pub coverage_reporting: bool, pub token_executables: Vec<PathBuf>, pub token_src_files: Vec<PathBuf>, pub token_files: Vec<PathBuf>, pub tokens: Vec<Vec<u8>>, pub checkpoint_path: PathBuf, pub pre_snapshot_checkpoint: bool, pub log_path: PathBuf, pub log_to_file: bool, pub keep_all_corpus: bool, pub use_initial_as_corpus: bool, pub debug_log_libafl: bool, pub shutdown_on_stop_without_reason: bool, pub quit_on_iteration_limit: bool, pub save_timeout_execution_traces: bool, pub save_solution_execution_traces: bool, pub save_interesting_execution_traces: bool, pub save_all_execution_traces: bool, pub execution_trace_directory: PathBuf, pub execution_trace_pc_only: bool, pub heartbeat: bool, pub heartbeat_interval: u64, pub symbolic_coverage: bool, pub windows: bool, pub debuginfo_download_directory: PathBuf, pub debug_info: HashMap<String, Vec<PathBuf>>, pub debuginfo_source_directory: PathBuf, pub symbolic_coverage_system: bool, pub symbolic_coverage_directory: PathBuf, pub(crate) stop_hap_handle: HapHandle, pub(crate) breakpoint_memop_hap_handle: HapHandle, pub(crate) exception_hap_handle: HapHandle, pub(crate) magic_hap_handle: HapHandle, pub(crate) control_register_write_hap_handle: HapHandle, pub architecture_hints: HashMap<i32, ArchitectureHint>, pub(crate) fuzz_thread: OnceCell<JoinHandle<Result<()>>>, pub(crate) fuzzer_tx: OnceCell<Sender<ExitKind>>, pub(crate) fuzzer_rx: OnceCell<Receiver<Testcase>>, pub(crate) fuzzer_shutdown: OnceCell<Sender<ShutdownMessage>>, pub(crate) fuzzer_messages: OnceCell<Receiver<FuzzerMessage>>, pub(crate) coverage_map: OnceCell<OwnedMutSlice<'static, u8>>, pub(crate) aflpp_cmp_map_ptr: OnceCell<*mut AFLppCmpLogMap>, pub(crate) aflpp_cmp_map: OnceCell<&'static mut AFLppCmpLogMap>, pub(crate) coverage_prev_loc: u64, pub(crate) timeout_event: OnceCell<Event>, pub(crate) edges_seen: HashSet<u64>, pub(crate) edges_seen_since_last: HashMap<u64, u64>, pub(crate) execution_trace: ExecutionTrace, pub(crate) coverage: Records, pub(crate) snapshot_name: OnceCell<String>, pub(crate) micro_checkpoint_index: OnceCell<i32>, pub(crate) stop_reason: Option<StopReason>, pub(crate) start_info: OnceCell<StartInfo>, pub(crate) start_time: OnceCell<SystemTime>, pub(crate) last_heartbeat_time: Option<SystemTime>, pub(crate) log: OnceCell<File>, pub(crate) coverage_enabled: bool, pub(crate) cmplog_enabled: bool, pub(crate) start_processor_number: OnceCell<i32>, pub(crate) processors: HashMap<i32, Architecture>, pub(crate) repro_testcase: Option<Vec<u8>>, pub(crate) repro_bookmark_set: bool, pub(crate) stopped_for_repro: bool, pub(crate) iterations: usize, pub(crate) use_snapshots: bool, pub(crate) timeouts: usize, pub(crate) solutions: usize, pub(crate) windows_os_info: WindowsOsInfo, pub(crate) cr3_cache: HashMap<i32, i64>, pub(crate) source_file_cache: SourceCache,
}
Expand description

The main module class for the TSFFS fuzzer, stores state and configuration information

Fields§

§conf_object: ConfObject§all_breakpoints_are_solutions: bool

Whether all breakpoints are treated as solutions. When set to True, any breakpoint which triggers a Core_Breakpoint_Memop HAP will be treated as a solution. This allows setting memory breakpoints on specific memory locations to trigger a solution when the memory is read, written, or executed. Not all breakpoints cause this HAP to occur.

For example, to set an execution breakpoint on the address $addr:

$addr = 0x100000 $bp = (bp.memory.break -x $addr) @tsffs.all_breakpoints_are_solutions = True

Tsffs will treat the breakpoint as a solution (along with all other breakpoints), and the fuzzer will stop when the breakpoint is hit.

§all_exceptions_are_solutions: bool

Whether all exceptions are treated as solutions. When set to True, any CPU exception or interrupt which triggers a Core_Exception HAP will be treated as a solution. This can be useful when enabled in a callback after which any exception is considered a solution and is typically not useful when enabled during the start-up process because most processors will generate exceptions during start-up and during normal operation.

§exceptions: BTreeSet<i64>

The set of exceptions which are treated as solutions. For example on x86_64, setting:

@tsffs.exceptions = [14]

would treat any page fault as a solution.

§breakpoints: BTreeSet<BreakpointId>

The set of breakpoints which are treated as solutions. For example, to set a solution breakpoint on the address $addr (note the breakpoint set from the Simics command is accessed through the simenv namespace):

$addr = 0x100000 $bp = (bp.memory.break -x $addr) @tsffs.breakpoints = [simenv.bp]

§timeout: f64

The timeout in seconds of virtual time for each iteration of the fuzzer. If the virtual time timeout is exceeded for a single iteration, the iteration is stopped and the testcase is saved as a solution.

§start_on_harness: bool

Whether the fuzzer should start on compiled-in harnesses. If set to True, the fuzzer will start fuzzing when a harness macro is executed.

§stop_on_harness: bool

Whether the fuzzer should stop on compiled-in harnesses. If set to True, the fuzzer will start fuzzing when a harness macro is executed.

§magic_start_index: u64

The index number which is passed to the platform-specific magic instruction HAP by a compiled-in harness to signal that the fuzzer should start the fuzzing loop.

This option is useful when fuzzing a target which has multiple start harnesses compiled into it, and the fuzzer should start on a specific harness.

There can only be one magic start value, because only one fuzzing loop can be running (and they cannot be nested). This only has an effect if start_on_harness is set.

§magic_stop_indices: Vec<u64>

The magic numbers which is passed to the platform-specific magic instruction HAP by a compiled-in harness to signal that the fuzzer should stop execution of the current iteration.

This option is useful when fuzzing a target which has multiple stop harnesses compiled into it, and the fuzzer should stop on a specific subset of stop harness macro calls.

This only has an effect if stop_on_harness is set.

§magic_assert_indices: Vec<u64>

The numbers which are passed to the platform-specific magic instruction HAP by a compiled-in harness to signal that the fuzzer should stop execution of the current iteration and save the testcase as a solution.

This only has an effect if stop_on_harness is set.

§iteration_limit: usize

The limit on the number of fuzzing iterations to execute. If set to 0, the fuzzer will run indefinitely. If set to a positive integer, the fuzzer will run until the limit is reached.

§initial_random_corpus_size: usize

The size of the corpus to generate randomly. If generate_random_corpus is set to True, the fuzzer will generate a random corpus of this size before starting the fuzzing loop.

§corpus_directory: PathBuf

The directory to load the corpus from and save new corpus items to. This directory may be a SIMICS relative path prefixed with “%simics%”. It is an error to provide no corpus directory when set_generate_random_corpus(True) has not been called prior to fuzzer startup. It is also an error to provide an empty corpus directory without calling set_generate_random_corpus(True). If not provided, “%simics%/corpus” will be used by default.

§solutions_directory: PathBuf

The directory to save solutions to. This directory may be a SIMICS relative path prefixed with “%simics%”. If not provided, “%simics%/solutions” will be used by default.

§generate_random_corpus: bool

Whether to generate a random corpus before starting the fuzzing loop. If set to True, the fuzzer will generate a random corpus of size initial_random_corpus_size before starting the fuzzing loop. This should generally be used only for debugging and testing purposes, and is not recommended for use in production. A real corpus representative of both valid and invalid inputs should be used in production.

§cmplog: bool

Whether comparison logging should be used during fuzzing to enable value-driven mutations. If set to True, the fuzzer will use comparison logging to enable value-driven mutations. This should always be enabled unless the target is known to not benefit from value-driven mutations or run too slowly when solving for comparison values.

§coverage_reporting: bool

Whether coverage reporting should be enabled. When enabled, new edge addresses will be logged.

§token_executables: Vec<PathBuf>

A set of executable files to tokenize. Tokens will be extracted from these files and used to drive token mutations of testcases.

§token_src_files: Vec<PathBuf>

A set of source files to tokenize. Tokens will be extracted from these files and used to drive token mutations of testcases. C source files are expected, and strings and tokens will be extracted from strings in the source files.

§token_files: Vec<PathBuf>

Files in the format of:

x = “hello” y = “foo\x41bar”

which will be used to drive token mutations of testcases.

§tokens: Vec<Vec<u8>>

Sets of tokens to use to drive token mutations of testcases. Each token set is a bytes which will be randomically inserted into testcases.

§checkpoint_path: PathBuf

The path to the checkpoint saved prior to fuzzing when using snapshots

§pre_snapshot_checkpoint: bool§log_path: PathBuf

The path to the log file which will be used to log the fuzzer’s output statistics

§log_to_file: bool§keep_all_corpus: bool§use_initial_as_corpus: bool

Whether to use the initial contents of the testcase buffer as an entry in the corpus

§debug_log_libafl: bool

Whether to enable extra debug logging for LibAFL

§shutdown_on_stop_without_reason: bool

Whether to send shut down on stops without reason. This means fuzzing cannot be resumed.

§quit_on_iteration_limit: bool

Whether to quit on iteration limit

§save_timeout_execution_traces: bool

Whether to save execution traces of test cases which result in a timeout

§save_solution_execution_traces: bool

Whether to save execution traces of test cases which result in a solution

§save_interesting_execution_traces: bool

Whether to save execution traces of test cases which result in an interesting input

§save_all_execution_traces: bool

Whether to save all execution traces. This will consume a very large amount of resources and should only be used for debugging and testing purposes.

§execution_trace_directory: PathBuf

The directory to save execution traces to, if any are set to be saved. This directory may be a SIMICS relative path prefixed with “%simics%”. If not provided, “%simics%/execution-traces” will be used by default.

§execution_trace_pc_only: bool

Whether execution traces should include just PC (vs instruction text and bytes)

§heartbeat: bool

Whether a heartbeat message should be emitted every heartbeat_interval seconds

§heartbeat_interval: u64

The interval in seconds between heartbeat messages

§symbolic_coverage: bool

Whether symbolic coverage should be used during fuzzing

§windows: bool

Whether windows is being run in the simulation

§debuginfo_download_directory: PathBuf

Directory in which to download PDB and EXE files from symbol servers on Windows

§debug_info: HashMap<String, Vec<PathBuf>>

Mapping of file name (name and extension e.g. fuzzer-app.exe or target.sys) to a tuple of (exe path, debuginfo path) where debuginfo is either a PDB or DWARF file

§debuginfo_source_directory: PathBuf

Directory in which source files are located. Source files do not need to be arranged in the same directory structure as the compiled source, and are looked up by hash.

§symbolic_coverage_system: bool

Whether symbolic coverage should be collected for system components by downloading executable and debug info files where possible.

§symbolic_coverage_directory: PathBuf

Directory in which source files are located. Source files do not need to be arranged in the same directory structure as the compiled source, and are looked up by hash.

§stop_hap_handle: HapHandle

Handle for the core simulation stopped hap

§breakpoint_memop_hap_handle: HapHandle

Handle for the core breakpoint memop hap

§exception_hap_handle: HapHandle

Handle for exception HAP

§magic_hap_handle: HapHandle

The handle for the registered magic HAP, used to listen for magic start and stop if start_on_harness or stop_on_harness are set.

§control_register_write_hap_handle: HapHandle

Handle for the core control register write hap

§architecture_hints: HashMap<i32, ArchitectureHint>

A mapping of architecture hints from CPU index to architecture hint. This architecture hint overrides the detected architecture of the CPU core. This is useful when the architecture of the CPU core is not detected correctly, or when the architecture of the CPU core is not known at the time the fuzzer is started. Specifically, x86 cores which report their architecture as x86_64 can be overridden to x86.

§fuzz_thread: OnceCell<JoinHandle<Result<()>>>

Fuzzer thread

§fuzzer_tx: OnceCell<Sender<ExitKind>>

Message sender to the fuzzer thread. TSFFS sends exit kinds to the fuzzer thread to report whether testcases resulted in normal exit, timeout, or solutions.

§fuzzer_rx: OnceCell<Receiver<Testcase>>

Message receiver from the fuzzer thread. TSFFS receives new testcases and run configuration from the fuzzer thread.

§fuzzer_shutdown: OnceCell<Sender<ShutdownMessage>>

A message sender to inform the fuzzer thread that it should exit.

§fuzzer_messages: OnceCell<Receiver<FuzzerMessage>>

Reciever from the fuzzer thread to receive messages from the fuzzer thread including status messages and structured introspection data like new edge findings.

§coverage_map: OnceCell<OwnedMutSlice<'static, u8>>

The coverage map

§aflpp_cmp_map_ptr: OnceCell<*mut AFLppCmpLogMap>

A pointer to the AFL++ comparison map

§aflpp_cmp_map: OnceCell<&'static mut AFLppCmpLogMap>

The owned AFL++ comparison map

§coverage_prev_loc: u64

The previous location for coverage for calculating the hash of edges.

§timeout_event: OnceCell<Event>

The registered timeout event which is registered and used to detect timeouts in virtual time

§edges_seen: HashSet<u64>

The set of edges which have been seen at least once.

§edges_seen_since_last: HashMap<u64, u64>

A map of the new edges to their AFL indices seen since the last time the fuzzer provided an update. This is not cleared every execution.

§execution_trace: ExecutionTrace

The set of PCs comprising the current execution trace. This is cleared every execution.

§coverage: Records

The current line coverage state comprising the total execution. This is not cleared and is persistent across the full campaign until the fuzzer stops.

§snapshot_name: OnceCell<String>

The name of the fuzz snapshot, if saved

§micro_checkpoint_index: OnceCell<i32>

The index of the micro checkpoint saved for the fuzzer. Only present if not using snapshots.

§stop_reason: Option<StopReason>

The reason the current stop occurred

§start_info: OnceCell<StartInfo>

The buffer and size information, if saved

§start_time: OnceCell<SystemTime>

The time the fuzzer was started at

§last_heartbeat_time: Option<SystemTime>

The time the fuzzer was started at

§log: OnceCell<File>§coverage_enabled: bool

Whether cmplog is currently enabled

§cmplog_enabled: bool

Whether cmplog is currently enabled

§start_processor_number: OnceCell<i32>

The number of the processor which starts the fuzzing loop (via magic or manual methods)

§processors: HashMap<i32, Architecture>

Tracked processors. This always includes the start processor, and may include additional processors that are manually added by the user

§repro_testcase: Option<Vec<u8>>

A testcase to use for repro

§repro_bookmark_set: bool

Whether a bookmark has been set for repro mode

§stopped_for_repro: bool

Whether the fuzzer is currently stopped in repro mode

§iterations: usize

The number of iterations which have been executed so far

§use_snapshots: bool

Whether snapshots are used. Snapshots are used on Simics 7.0.0 and later.

§timeouts: usize

The number of timeouts so far

§solutions: usize

The number of solutions so far

§windows_os_info: WindowsOsInfo§cr3_cache: HashMap<i32, i64>§source_file_cache: SourceCache

Implementations§

Source§

impl Tsffs

Source

const EDGES_OBSERVER_NAME: &'static str = "coverage"

Source

const AFLPP_CMP_OBSERVER_NAME: &'static str = "aflpp_cmplog"

Source

const CMPLOG_OBSERVER_NAME: &'static str = "cmplog"

Source

const TIME_OBSERVER_NAME: &'static str = "time"

Source

const TIMEOUT_FEEDBACK_NAME: &'static str = "time"

Source

const CORPUS_CACHE_SIZE: usize = 4_096usize

Source

pub fn start_fuzzer_thread(&mut self) -> Result<()>

Start the fuzzing thread.

Source

pub fn send_shutdown(&mut self) -> Result<()>

Source

pub fn get_testcase(&mut self) -> Result<Testcase>

Source§

impl Tsffs

Source

fn on_simulation_stopped_magic_start( &mut self, magic_number: MagicNumber, ) -> Result<()>

Source

fn on_simulation_stopped_magic_assert(&mut self) -> Result<()>

Source

fn on_simulation_stopped_magic_stop(&mut self) -> Result<()>

Source

fn on_simulation_stopped_with_magic( &mut self, magic_number: MagicNumber, ) -> Result<()>

Source

fn on_simulation_stopped_with_manual_start( &mut self, processor: *mut ConfObject, info: ManualStartInfo, ) -> Result<()>

Source

fn on_simulation_stopped_manual_start_without_buffer( &mut self, processor: *mut ConfObject, ) -> Result<()>

Source

fn on_simulation_stopped_manual_stop(&mut self) -> Result<()>

Source

fn on_simulation_stopped_solution(&mut self, kind: SolutionKind) -> Result<()>

Source

fn on_simulation_stopped_with_reason( &mut self, reason: StopReason, ) -> Result<()>

Source

fn on_simulation_stopped_without_reason(&mut self) -> Result<()>

Source

pub fn on_simulation_stopped(&mut self) -> Result<()>

Called on core simulation stopped HAP

Source

pub fn on_exception( &mut self, _obj: *mut ConfObject, exception: i64, ) -> Result<()>

Called on core exception HAP. Check to see if this exception is configured as a solution or all exceptions are solutions and trigger a stop if so

Source

pub fn on_breakpoint_memop( &mut self, obj: *mut ConfObject, breakpoint: i64, transaction: *mut GenericTransaction, ) -> Result<()>

Called on breakpoint memory operation HAP. Check to see if this breakpoint is configured as a solution or if all breakpoints are solutions and trigger a stop if so

Source

pub fn on_magic_instruction( &mut self, trigger_obj: *mut ConfObject, magic_number: MagicNumber, ) -> Result<()>

Check if magic instructions are set to trigger start and stop conditions, and trigger them if needed

Source

pub fn on_control_register_write( &mut self, trigger_obj: *mut ConfObject, register_nr: i64, value: i64, ) -> Result<()>

Source§

impl Tsffs

Source

pub fn add_trace_processor(&mut self, cpu: *mut ConfObject) -> Result<()>

Source

pub fn add_architecture_hint( &mut self, cpu: *mut ConfObject, hint: *mut c_char, ) -> Result<()>

Source§

impl Tsffs

Source

pub fn repro(&mut self, testcase_file: *mut c_char) -> Result<()>

Source

pub fn start_with_buffer_ptr_size_ptr( &mut self, cpu: *mut ConfObject, buffer_address: GenericAddress, size_address: GenericAddress, virt: bool, ) -> Result<()>

Source

pub fn start_with_buffer_ptr_size_value( &mut self, cpu: *mut ConfObject, testcase_address: GenericAddress, maximum_size: u32, virt: bool, ) -> Result<()>

Source

pub fn start_with_buffer_ptr_size_ptr_value( &mut self, cpu: *mut ConfObject, buffer_address: GenericAddress, size_address: GenericAddress, maximum_size: u32, virt: bool, ) -> Result<()>

Source

pub fn start_without_buffer( &mut self, cpu: *mut ConfObject, ) -> Result<AttrValue>

Source

pub fn stop(&mut self) -> Result<()>

Source

pub fn solution(&mut self, id: u64, message: *mut c_char) -> Result<()>

Source§

impl Tsffs

Source

pub fn log_messages(&mut self) -> Result<()>

Source

pub fn log<I>(&mut self, item: I) -> Result<()>
where I: Serialize,

Source§

impl Tsffs

Source

pub fn on_control_register_write_windows_symcov( &mut self, trigger_obj: *mut ConfObject, register_nr: i64, value: i64, ) -> Result<()>

Triggered on control register write to refresh windows OS information if necessary

Source§

impl Tsffs

Source

fn log_pc(&mut self, pc: u64) -> Result<()>

Source

fn log_cmp( &mut self, pc: u64, types: Vec<CmpType>, cmp: CmpValues, ) -> Result<()>

Source§

impl Tsffs

Source

pub fn on_instruction_after( &mut self, _obj: *mut ConfObject, cpu: *mut ConfObject, handle: *mut instruction_handle_t, ) -> Result<()>

Source

pub fn on_instruction_before( &mut self, _obj: *mut ConfObject, cpu: *mut ConfObject, handle: *mut instruction_handle_t, ) -> Result<()>

Source§

impl Tsffs

Source

pub(crate) const CLASS: ClassInfo

Source§

impl Tsffs

Source

pub const NAME: &'static str = "tsffs"

The name of the class

Source§

impl Tsffs

Source

pub(crate) fn new(obj: *mut ConfObject, value: Tsffs) -> *mut ConfObject

Source§

impl Tsffs

Source

pub const COVERAGE_MAP_SIZE: usize = 131_072usize

The size of the coverage map in bytes

Source

pub const TIMEOUT_EVENT_NAME: &'static str = "detector_timeout_event"

The name of the registered timeout event

Source

pub const SNAPSHOT_NAME: &'static str = "tsffs-origin-snapshot"

The name of the initial snapshot

Source§

impl Tsffs

Implementations for controlling the simulation

Source

pub fn stop_simulation(&mut self, reason: StopReason) -> Result<()>

Stop the simulation with a reason

Source§

impl Tsffs

Implementations for common functionality

Source

pub fn add_processor( &mut self, cpu: *mut ConfObject, is_start: bool, ) -> Result<()>

Add a monitored processor to the simulation and whether the processor is the “start processor” which is the processor running when the fuzzing loop begins

Source

pub fn start_processor(&mut self) -> Option<&mut Architecture>

Return a reference to the saved “start processor” if there is one. There will be no “start processor” before a start harness (manual or magic) is executed.

Source§

impl Tsffs

Source

pub fn save_initial_snapshot(&mut self) -> Result<()>

Save the initial snapshot using the configured method (either rev-exec micro checkpoints or snapshots)

Source

pub fn restore_initial_snapshot(&mut self) -> Result<()>

Restore the initial snapshot using the configured method (either rev-exec micro checkpoints or snapshots)

Source

pub fn have_initial_snapshot(&self) -> bool

Whether an initial snapshot has been saved

Source

pub fn save_repro_bookmark_if_needed(&mut self) -> Result<()>

Save a repro bookmark if one is needed

Source§

impl Tsffs

Source

pub fn get_and_write_testcase(&mut self) -> Result<()>

Get a testcase from the fuzzer and write it to memory along with, optionally, a size

Source

pub fn post_timeout_event(&mut self) -> Result<()>

Post a new timeout event on the start processor with the configured timeout in seconds

Source

pub fn cancel_timeout_event(&mut self) -> Result<()>

Cancel a pending timeout event, if there is one. Used when execution reaches a solution or normal stop condition before a timeout occurs.

Source

pub fn save_symbolic_coverage(&mut self) -> Result<()>

Source

pub fn save_execution_trace(&mut self) -> Result<()>

Save the current execution trace to a file

Trait Implementations§

Source§

impl AsConfObject for Tsffs

§

fn as_conf_object(&self) -> *const conf_object

Convert a reference to this object to a raw ConfObject pointer
§

fn as_conf_object_mut(&mut self) -> *mut conf_object

Convert a mutable reference to this object to a raw ConfObject pointer
Source§

impl ClassAlloc for Tsffs

§

unsafe fn alloc<T>(_cls: *mut conf_class) -> Result<*mut conf_object, Error>

Allocates an instance of the object using mm_zalloc and returns a pointer to the allocated object, whose first entry is the ConfObject instance associated with it Read more
Source§

impl ClassCreate for Tsffs

Source§

fn create() -> Result<*mut ConfClass>

Create a class and register it in SIMICS. This does not instantiate the class by creating any objects, it only creates the (python) class that is used as a blueprint to instantiate the class
Source§

impl ClassDealloc for Tsffs

§

unsafe fn dealloc(instance: *mut conf_object) -> Result<(), Error>

Called after all objects are deinitialized, this should free the allocated object using mm_free Read more
Source§

impl ClassDeinit for Tsffs

§

unsafe fn deinit(_instance: *mut conf_object) -> Result<(), Error>

Called first on all objects being deleted, should do the opposite of init and deinitialize any additionally-allocated memory, destroy file descriptors, etc. The default implementation of this method does nothing Read more
Source§

impl ClassFinalize for Tsffs

§

unsafe fn finalize(_instance: *mut conf_object) -> Result<(), Error>

Object can do final initialization that requires attribute values, but should avoid calling interface methods on other objects. The default implementation of this method does nothing Read more
Source§

impl ClassInit for Tsffs

Source§

unsafe fn init(instance: *mut ConfObject) -> Result<*mut ConfObject>

Perform class specific instantiation, set default values for attributes. May allocate additional memory if co-allocation is not used. Attribute setters are called after this function returns. The default implementation returns the object without modification. Returning NULL from this function indicates an error Read more
Source§

impl ClassObjectsFinalize for Tsffs

Source§

unsafe fn objects_finalized(instance: *mut ConfObject) -> Result<()>

Called after object is fully constructed and can participate in simulation and reverse execution. May call interface methods on other objects here as part of initialization. The default implementation of this method does nothing Read more
Source§

impl Default for Tsffs

Source§

fn default() -> Tsffs

Returns the “default value” for a type. Read more
Source§

impl<'x> From<*const conf_object> for &'x Tsffs

Source§

fn from(obj: *const ConfObject) -> &'x Tsffs

Convert a raw ConfObject pointer to a reference to this object

§Safety

This function dereferences a raw pointer. It must be called with a valid pointer which has a sufficient lifetime.

Source§

impl From<*mut c_void> for &'static Tsffs

Source§

fn from(value: *mut c_void) -> Self

Converts to this type from the input type.
Source§

impl From<*mut c_void> for &'static mut Tsffs

Source§

fn from(value: *mut c_void) -> Self

Converts to this type from the input type.
Source§

impl<'x> From<*mut conf_object> for &'x Tsffs

Source§

fn from(obj: *mut ConfObject) -> &'x Tsffs

Convert a raw ConfObject pointer to a mutable reference to this object

§Safety

This function dereferences a raw pointer. It must be called with a valid pointer which has a sufficient lifetime.

Source§

impl<'x> From<*mut conf_object> for &'x mut Tsffs

Source§

fn from(obj: *mut ConfObject) -> &'x mut Tsffs

Convert a raw ConfObject pointer to a mutable reference to this object

§Safety

This function dereferences a raw pointer. It must be called with a valid pointer which has a sufficient lifetime.

Source§

impl FromConfObject for Tsffs

§

unsafe fn from_conf_object<'a>(obj: *const conf_object) -> &'a Self

Get a reference to this object from a raw ConfObject pointer Read more
§

unsafe fn from_conf_object_mut<'a>(obj: *mut conf_object) -> &'a mut Self

Get a mutable reference to this object from a raw ConfObject pointer Read more
Source§

impl Class for Tsffs

Source§

impl HasInterface<config> for Tsffs

Source§

impl HasInterface<fuzz> for Tsffs

Auto Trait Implementations§

§

impl !Freeze for Tsffs

§

impl !RefUnwindSafe for Tsffs

§

impl !Send for Tsffs

§

impl !Sync for Tsffs

§

impl Unpin for Tsffs

§

impl !UnwindSafe for Tsffs

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
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<Tail, T> Prepend<T> for Tail

§

type PreprendResult = Tail

The Resulting [TupleList], of an [Prepend::prepend()] call, including the prepended entry.
§

fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)

Prepend a value to this tuple, returning a new tuple with prepended value.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeHasClientPerfMonitor for T

§

impl<T> MaybeHasScalabilityMonitor for T