Module util

Source
Expand description

Helper utilities for the DFIR syntax.

Modules§

clear
Module for the Clear trait.
demux_enumdfir_macro
Trait for the demux_enum derive and operator.
deploydeploy_integration
Hydro Deploy integration for DFIR.
multiset
A multiset backed by a HashMap
priority_stack
A priority queue in which elements of the same priority are popped in a LIFO order.
simulation
Hydro/DFIR Deterministic Simulation Testing Framework
slot_vec
A Vec-based SlotMap-esque datastructure and corresponding Key type.
sparse_vec
A vector that supports efficient deletion without reordering all subsequent items.
unsync
Unsync (i.e. single-threaded) synchronization primitives.

Structs§

DroppableChild
Terminates the inner Child process when dropped.
MonotonicFn
A wrapper christening a closure as a monotonic function
Morphism
A wrapper christening a closure as a lattice morphism

Enums§

Persistence
Persit or delete tuples
PersistenceKeyed
Persit or delete key-value pairs

Functions§

bind_tcp
Create a listening tcp socket, and then as new connections come in, receive their data and forward it to a queue.
bind_tcp_bytes
Returns a newline-delimited bytes Sender, Receiver, and SocketAddr bound to the given address.
bind_tcp_lines
This is the same thing as bind_tcp_bytes except instead of using a length-delimited encoding scheme it uses new lines to separate frames.
bind_udp_bytes
Returns a length-delimited bytes Sink, Stream, and SocketAddr bound to the given address. The input addr may have a port of 0, the returned SocketAddr will have the chosen port.
bind_udp_lines
Returns a newline-delimited bytes Sink, Stream, and SocketAddr bound to the given address. The input addr may have a port of 0, the returned SocketAddr will have the chosen port.
collect_ready
Collects the immediately available items from the Stream into a FromIterator collection.
collect_ready_async
Collects the immediately available items from the Stream into a collection (Default + Extend).
connect_tcp
The inverse of bind_tcp.
connect_tcp_bytes
The inverse of bind_tcp_bytes.
connect_tcp_lines
This is the same thing as connect_tcp_bytes except instead of using a length-delimited encoding scheme it uses new lines to separate frames.
deserialize_from_bytes
Serialize a message from bytes using bincode.
ipv4_resolve
Resolve the ipv4 SocketAddr from an IP or hostname string.
iter_batches_stream
Converts an iterator into a stream that emits n items at a time, yielding between each batch.
ready_iter
Returns an Iterator of any immediately available items from the [Stream].
run_cargo_example
Run a rust example as a test.
serialize_to_bytes
Serialize a message to bytes using bincode.
sort_unstable_by_key_hrtb
Sort a slice using a key fn which returns references.
tcp_bytes
Helper creates a TCP Stream and Sink for Bytes strings where each string is length-delimited.
tcp_bytestream
Helper creates a TCP Stream and Sink for undelimited streams of Bytes.
tcp_framed
Helper creates a TCP Stream and Sink from the given socket, using the given Codec to handle delineation between inputs/outputs.
tcp_lines
Helper creates a TCP Stream and Sink for strings delimited by newlines.
udp_bytes
Helper creates a UDP Stream and Sink for Bytes strings where each string is length-delimited.
udp_bytestream
Helper creates a UDP Stream and Sink for undelimited streams of Bytes.
udp_framed
Returns a UDP Stream, Sink, and address for the given socket, using the given Codec to handle delineation between inputs/outputs.
udp_lines
Helper creates a UDP Stream and Sink for Strings delimited by newlines.
unbounded_channel
Returns a channel as a (1) unbounded sender and (2) unbounded receiver Stream for use in DFIR.
unix_bytes
Helper creates a Unix Stream and Sink for Bytes strings where each string is length-delimited.
unix_bytestream
Helper creates a Unix Stream and Sink for undelimited streams of Bytes.
unix_framed
Helper creates a Unix Stream and Sink from the given socket, using the given Codec to handle delineation between inputs/outputs.
unix_lines
Helper creates a Unix Stream and Sink for strings delimited by newlines.
unsync_channel
Returns an unsync channel as a (1) sender and (2) receiver Stream for use in DFIR.
wait_for_process_output
Waits for a specific process output before returning.

Type Aliases§

TcpFramedSink
A framed TCP Sink (sending).
TcpFramedStream
A framed TCP Stream (receiving).
UdpBytesSink
A UDP undelimited bytes Sink (sending).
UdpBytesStream
A UDP undelimited bytes Stream (receiving).
UdpFramedSink
A framed UDP Sink (sending).
UdpFramedStream
A framed UDP Stream (receiving).
UdpLinesSink
A UDP newline-delimited String Sink (sending).
UdpLinesStream
A UDP newline-delimited String Stream (receivng).
UdpSink
A UDP length-delimited frame Sink (sending).
UdpStream
A UDP length-delimited frame Stream (receiving).