Module common

Module common 

Source
Expand description

The common helper library

Structs§

CStringArray
A structure to hold owned C-type strings for ffi usages.
ResourceGuard
The resource guard ensures no resource is leaking. On drop(), the destroyer is used to free the resource.

Enums§

SpinError
The error returned from the spin function

Functions§

format_size
get_hashed_cache_file_path
Generate a temp file path for cache, the filename is hashed
load_cache
random_sleep
Sleep random nanoseconds, the nanosecond value could be bigger than a second.
save_cache
spin_work_with_exp_backoff