A rust_embed asset source that embeds files in release builds. Dev builds
read from the checkout at runtime unless the debug-embed feature is enabled,
in which case they embed the files too.
The checkout that produced this binary, resolved at runtime by walking up to
the first ancestor that contains a .git entry (a directory in a normal
clone, a file in a git worktree or submodule). Cargo and corgi both place
built binaries under <repo>/target/<profile>/, so the repository root is
always an ancestor of the executable.
Extend a sorted vector with a sorted sequence of items, maintaining the vector’s sort order and
enforcing a maximum length. This also de-duplicates items. Sort the items according to the given callback. Before calling this,
both vec and new_items should already be sorted according to the cmp comparator.
Merges source into target: objects are merged recursively, key by key;
any other colliding value in target — including arrays — is replaced by
source’s value wholesale.
Parses the contents of an os-release file (as found at /etc/os-release
and described by the systemd spec) into a human-readable string such as
"ubuntu 24.04", combining the ID and VERSION_ID fields.
Similar to str::split, but also provides byte-offset ranges of the results. Unlike
str::split, this is not generic on pattern types and does not return an Iterator.
Removes characters from the front of the string if its length is greater than max_chars and
prepends the string with “…”. Returns string unchanged if its length is smaller than max_chars.
Removes characters from the end of the string if its length is greater than max_chars and
appends “…” to the string. Returns string unchanged if its length is smaller than max_chars.
Takes only max_lines from the string and, if there were more than max_lines-1, appends a
a newline and “…” to the string, so that max_lines are returned.
Returns string unchanged if its length is smaller than max_lines.
Yields [i, i + 1, i - 1, i + 2, ..], each modulo wrap_length and bounded by
additional_before and additional_after. If the wrapping causes overlap, duplicates are not
emitted. If wrap_length is 0, nothing is yielded.