Crate gstuff [−] [src]
Macros
| ERR |
Returns a |
| ERRL |
Prepends file name and line number to the given message. |
| find_parse_replace_s |
Uses nom to find all matches of the given |
| gstring |
A helper to build a string on the stack. |
| parse_replace_s |
Uses nom to find all matches of the given |
| take_until_find_parse_s |
|
| take_until_parse_s |
Implements the |
| try_f |
Returns on error, prepending the current location to a stringified error, then passing the string to |
| try_fu |
Lifts an error into a boxed future. |
| try_fus |
Lifts an error into a boxed future. |
| try_s |
Returns on error, converting the |
| try_sp |
Like |
Structs
| FileLock |
Allows several threads or processes to compete for a shared resource by tracking resource ownership with a file. |
| ISATTY |
True if the standard output is a terminal. |
| ProcEn |
Process entry in /proc. |
| ProcIt |
Iterate over processes in /proc. |
Functions
| any_to_str |
Useful with panic handlers. |
| cmd |
Run a command, printing it first. Stdout and stderr are forwarded through ( |
| duration_to_float |
Converts the duration into a number of seconds with fractions. |
| filename |
Shortcut to path->filename conversion. |
| last_modified_sec |
Last-modified of the file in seconds since the UNIX epoch, with fractions. |
| netstring |
Takes a netstring from the front of the slice. |
| now_float |
The current number of seconds since the UNIX epoch, with fractions. |
| rdtsc |
Time Stamp Counter (number of cycles). |
| slurp |
Read contents of the file into a |
| slurp_prog |
Runs a command in a shell, returning stderr+stdout on success. |
| status_line |
Clears the line to the right, prints the given text, moves the caret all the way to the left. |
| status_line_clear |
Clears the status line ff stdout |
| with_hostname |
Wraps |
| with_status_line |
Clear the status line, run the code, then restore the status line. |