Expand description
Miscellaneous utilities that are used by Shadow.
Modules§
- An event/listener framework to allow listeners to subscribe to event sources.
- A counter that can be used to count frequencies of a set of objects. The counter starts with no keys. When an unknown key is incremented, the counter adds a new key to an internal map and sets the count for that key to 1. When a known key is incremented, the count for that key increases. The state of the counter can be extracted by converting it to a string, which lists the counts for all keys sorted with the heaviest hitters first. Currently, only String types are supported, but we may eventually support counting generic types.
- Types for parsing/deserializing unit values.
Structs§
- A pointer to an object that is safe to dereference from any thread, if the Host lock for the specified host is held.
- Runtime memory error checking to help catch errors that C code is prone to. Can probably drop once C interop is removed.
- Helper for tracking the number of allocated objects.
Enums§
Traits§
- A trait we can use as a compile-time check to make sure that an object is Send.
- A trait we can use as a compile-time check to make sure that an object is Sync.
Functions§
- Returns
true
ifeq_ignore_ascii_case
returnstrue
on allu8
ascii pairs. Should only be used for ascii byte strings. - Copy the contents of the
src
directory to a new directory nameddst
. Permissions will be preserved. - If debug assertions are enabled, panics if
FD_CLOEXEC
is not set onfile
. - Convert a
&[i8]
to&[u8]
. Useful when interacting with C strings. Panics ifu8::try_from(c)
fails for anyc
in the slice. - Inject
injected_preloads
into the environmentenvv
. - Helper for converting a PathBuf to a CString
- Get the return code for a process that exited by the given signal, following the behaviour of bash.
- Convert a
&[u8]
to&[i8]
. Useful when interacting with C strings. Panics ifi8::try_from(c)
fails for anyc
in the slice. - Check that the plugin path is executable under Shadow.