Returns a Err(String)
, prepending the current location (file name and line number) to the string.
Prepends file name and line number to the given message.
A helper to build a string on the stack.
Returns on error, prepending the current location to a stringified error, then passing the string to From::from
.
Lifts an error into a boxed future. Box<Future<Item=_, Error=_>>
.
Lifts an error into a boxed future. Box<Future<Item=_, Error=String>>
.
Returns on error, converting the Err
value to String
and prepending the current location.
Like try_s
, but takes a reference.
Useful with panic handlers.
Helps logging binary data (particularly with text-readable parts, such as bencode, netstring)
by replacing all the non-printable bytes with the blank
character.
now_ms / 1000 / 86400 ↦ year, month, day UTC
Run a command, printing it first. Stdout and stderr are forwarded through (inherit
).
year, month 1..=12, day 1..=31 UTC ↦ UNIX milliseconds (aka now_ms) / 1000 / 86400
Converts the duration into a number of seconds with fractions.
Converts the duration into a number of milliseconds.
Shortcut to path->filename conversion.
integer with centiseconds “%y%m%d%H%M%S%.2f” into UNIX time in milliseconds
ISO 8601 shorthand “2022-12-12T12” converted into integer with centiseconds “%y%m%d%H%M%S%.2f”
Last-modified of the file in seconds since the UNIX epoch, with fractions.
Returns 0 if the file does not exists.
UNIX time into integer with centiseconds “%y%m%d%H%M%S%.2f”, UTC
Converts time in milliseconds into a number of seconds with fractions.
Takes a netstring from the front of the slice.
The current number of seconds since UNIX epoch, with fractions.
The current number of milliseconds since UNIX epoch.
Read contents of the file into a Vec
.
Runs a command in a shell, returning stderr+stdout on success.
Wraps gethostname
to fetch the current hostname into a temporary buffer.