Skip to main content

Module utils

Module utils 

Source
Expand description

Utility modules

Re-exports§

pub use shutdown::StopSignal;
pub use wire_failure::prefixed_wire_failure_text;
pub use wire_failure::wire_failure_text;
pub use wire_failure::WireFailure;
pub use truncate::truncate_for_llm;
pub use truncate::truncate_for_log;
pub use truncate::truncate_str;
pub use truncate::truncate_with_notice;
pub use truncate::truncate_with_suffix;

Modules§

bencode
A bound on bencode nesting, applied before a decoder ever sees the bytes.
bson_depth
A bound on BSON nesting, applied before bson ever sees the bytes.
clock
The monotonic and wall clocks, on every target NetGet builds for.
file_io
Bounded file I/O on native hosts; browser builds return explicit errors.
json_budget
Iterative budgets for JSON constructed in memory (serde’s parse depth limit does not apply to values built programmatically).
line_reader
One bounded, \n-terminated read, shared by the line-oriented text protocols.
quic
Shared owned QUIC transport and authenticated client configuration.
redact
Redact credentials from JSON before it is displayed or logged.
redis_keys
Redis mechanics shared by NetGet’s Redis server and client: the cluster hash slot of a key, which arguments of a command are keys, and the glob matcher pub/sub patterns use.
resp
A bound on RESP2 nesting and declared lengths, applied before a decoder ever sees the bytes.
sanitize
Control-character hygiene for text the model supplies.
save_load
Save/load utility for persisting server and client configurations
shutdown
Cooperative shutdown for blocking capture loops.
sql
What kind of answer an SQL statement expects, from its leading keyword.
task_guard
Stop a helper task when its owner goes away: aborting a task does not abort the tasks it spawned, so a connection’s reader task is held in one of these.
truncate
UTF-8 safe string truncation helpers.
wire_failure
What a network peer may be told when netget itself fails.