The abstract representation of a command line argument. Used to set all the options and
relationships that define a valid argument for the program.
Container for parse results.
A “meta iterator adaptor”. Its closure receives a reference to the iterator
and may pick off as many elements as it likes, to produce the next iterator element.
An asynchronous request body.
A low level representation of the byte offsets of each capture group.
An iterator over all non-overlapping capture matches in a haystack.
An iterator over the names of all capture groups in a regex.
Represents the capture groups for a single match.
Represents a server X509 certificate.
Iterator of a chain of source errors.
An iterator for the elements in a single chunk.
ChunkBy
is the storage for the lazy grouping operation.
An iterator that yields the Chunk iterators.
An iterator over all windows, wrapping back to the first elements when the
window would otherwise exceed the length of the iterator, producing tuples
of a specific size.
An asynchronous Client
to make Requests with.
A ClientBuilder
can be used to create a Client
with custom configuration.
An iterator to iterate through all the k
-length combinations in an iterator.
An iterator to iterate through all the n
-length combinations in an iterator, with replacement.
Build a command-line interface.
A Condition Variable
An iterator that maps an iterator of tuples like
((A, B), C)
to an iterator of (A, B, C)
.
ISO 8601 calendar date with time zone.
ISO 8601 combined date and time with time zone.
A duration in calendar days.
Set of environment variables to configure from.
Iterator returned for the error case of Itertools::exactly_one()
This iterator yields exactly the same elements as the input iterator.
An iterator adapter to filter and apply a transformation on values within a nested Result::Ok
.
An iterator adapter to filter values within a nested Result::Ok
.
The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59.
An iterator adaptor that flattens Result::Ok
values and
allows Result::Err
values through unchanged.
Format all iterator elements lazily, separated by sep
.
Format all iterator elements lazily, separated by sep
.
An iterator for the elements in a single group.
GroupingMap
is an intermediate struct for efficient group-and-fold operations.
It groups elements by their key and at the same time fold each group
using some aggregating operation.
An iterator that yields the Group iterators.
Represents a private key and X509 cert as a client certificate.
An iterator adaptor that alternates elements from two iterators until both
run out.
An iterator adaptor that alternates elements from the two iterators until
one of them runs out.
An iterator adaptor to insert a particular value created by a function
between each element of the adapted iterator.
ChunkLazy
is the storage for a lazy chunking operation.
ISO 8601 week.
An iterator that infinitely applies function to value and yields results.
An iterator adaptor that merges an abitrary number of base iterators
according to an ordering function.
The local timescale.
The env logger.
Represents a single match of a regex in a haystack.
An iterator over all non-overlapping matches in a haystack.
An iterator adaptor that merges the two base iterators in ascending order.
If both base iterators are sorted (ascending), the result is sorted.
Metadata about a log message.
The Request Method (VERB)
A duration in calendar months
An iterator adaptor that iterates over the cartesian product of
multiple iterators of type I
.
ISO 8601 calendar date without timezone.
Allows for every
proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE.
Also supports the conversion from ISO 8601 ordinal and week date.
ISO 8601 combined date and time without timezone.
ISO 8601 time without timezone.
Allows for the nanosecond precision and optional leap second representation.
A week represented by a
NaiveDate
and a
Weekday
which is the first
day of the week.
An empty counter that will always return the value 0
.
A helper type for forcing literal string replacement.
A configuration for filtering out requests that shouldn’t be proxied
A synchronization primitive which can be used to run a one-time
initialization. Useful for one-time initialization for globals, FFI or
related functionality.
Out of range error type used in various converting APIs
Represents error when converting TimeDelta
to/from a standard library
implementation
An iterator adaptor that pads a sequence to a minimum length by filling
missing elements using a closure.
An error from the parse
function.
The type returned by
from_str
when the string doesn’t match any of the log levels.
An error resulting from reading <Month>
value with FromStr
.
An error resulting from reading Weekday
value with FromStr
.
An iterator adaptor that takes items while a closure returns true
.
An iterator adaptor that iterates through all the k
-permutations of the
elements from an iterator.
An iterator adapter to get the positions of each element that matches a predicate.
An iterator to iterate through the powerset of the elements from an iterator.
An iterator that produces only the T
values as long as the
inner iterator produces Ok(T)
.
An iterator adaptor that iterates over the cartesian product of
the element sets of two iterators I
and J
.
Configuration of a proxy that a Client
should pass requests to.
An iterator adaptor that allows putting back a single
item to the front of the iterator.
An iterator adaptor that allows putting multiple
items in front of the iterator.
Raw fair mutex type backed by the parking lot.
Raw mutex type backed by the parking lot.
Raw reader-writer lock type backed by the parking lot.
Implementation of the GetThreadId
trait for lock_api::ReentrantMutex
.
A wrapper for Rc<RefCell<I>>
, that implements the Iterator
trait.
The “payload” of a log message.
A compiled regular expression for searching Unicode haystacks.
A configurable builder for a
Regex
.
Match multiple, possibly overlapping, regexes in a single search.
An iterator that produces n repetitions of an element.
A request which can be executed with Client::execute()
.
A builder to construct the properties of a Request
.
A Response to a submitted Request
.
A set of matches returned by a regex set.
An owned iterator over the set of matches from a regex set.
A borrowed iterator over the set of matches from a regex set.
An iterator over all substrings delimited by a regex match.
An iterator over at most N
substrings delimited by a regex match.
An HTTP status code (status-code
in RFC 7230 et al.).
An iterator over all group matches in a
Captures
value.
An iterator adaptor that consumes elements while the given predicate is
true
, including the element for which the predicate first returned
false
.
An iterator adaptor that borrows from a Clone
-able iterator
to only pick off elements while the predicate returns true
.
One half of an iterator pair where both return the same elements.
Time duration with nanosecond precision.
A timestamp that can be encoded into a UUID.
An iterator over a incomplete tuple.
An iterator to iterate through all combinations in a Clone
-able iterator that produces tuples
of a specific size.
An iterator over all contiguous windows that produces tuples of a specific size.
An iterator that groups the items in tuples of a specific size.
See
unfold
for more information.
An iterator adapter to filter out duplicate elements.
An iterator adapter to filter out duplicate elements.
An iterator adapter to apply a mutating function to each element before yielding it.
An upgraded HTTP connection.
A parsed URL record.
The UTC time zone. This is the most efficient time zone when you don’t need the local time.
It is also used as an offset (which is also a dummy type).
A Universally Unique Identifier (UUID).
A type indicating whether a timed wait on a condition variable returned
due to a time out or not.
An iterator adaptor that filters Option<A>
iterator elements
and produces A
. Stops on the first None
encountered.
An iterator adaptor that wraps each element in an
Position
.
An iterator which iterates two other iterators simultaneously
and panic if they have different lengths.
An iterator which iterates two other iterators simultaneously
and wraps the elements in
EitherOrBoth
.
Parse a set of arguments into a user-defined container.
Read bytes asynchronously.
An extension trait which adds utility methods to AsyncBufRead
types.
Read bytes asynchronously.
An extension trait which adds utility methods to AsyncRead
types.
Seek bytes asynchronously.
An extension trait which adds utility methods to AsyncSeek
types.
Write bytes asynchronously.
An extension trait which adds utility methods to AsyncWrite
types.
A counter that can be used by version 1 and version 6 UUIDs to support
the uniqueness of timestamps.
Create a
Command
relevant for a user-defined container.
Provides the context
method for Result
.
The common set of methods for date component.
A data structure that can be deserialized from any data format supported
by Serde.
A data format that can deserialize any data structure supported by
Serde.
Extension trait for rounding or truncating a DateTime by a TimeDelta.
Converts an instance of
ArgMatches
to a user-defined container.
A future represents an asynchronous computation obtained by use of
async
.
An extension trait for Future
s that provides a variety of convenient
adapters.
A trait to try to convert some type into a Url
.
An
Iterator
blanket implementation that provides extra adaptors and
methods.
Support trait for enabling a few common operation on lazy static values.
A trait encapsulating the operations required of a logger.
An iterator that can be unzipped into multiple collections.
The offset from the local time to UTC.
Parse command-line arguments into Self
.
An iterator that allows peeking at an element before deciding to accept it.
A trait for types that can be used to replace matches in a haystack.
Extension trait for http::response::Builder objects
A data structure that can be serialized into any data format supported
by Serde.
A data format that can serialize any data structure supported by Serde.
A Sink
is a value into which other values can be sent, asynchronously.
An extension trait for Sink
s that provides a variety of convenient
combinator functions.
A stream of values produced asynchronously.
An extension trait for Stream
s that provides a variety of convenient
combinator functions.
Parse a sub-command into a user-defined enum.
Extension trait for subsecond rounding or truncation to a maximum number
of digits. Rounding can be used to decrease the error variance when
serializing/persisting to lower precision. Truncation is the default
behavior in Chrono display formatting. Either can be used to guarantee
equality (e.g. for testing) when round-tripping through a lower precision
format.
The time zone.
The common set of methods for time component.
A convenience for futures that return Result
values that includes
a variety of adapters tailored to such futures.
Adapters specific to
Result
-returning futures
A convenience for streams that return Result
values that includes
a variety of adapters tailored to such futures.
Adapters specific to Result
-returning streams
Parse arguments into enums.
Used for immutable dereferencing operations, like *v
.
Equivalent to Ok::<_, anyhow::Error>(value).
Test whether the predicate holds for all elements in the iterable.
Test whether the predicate holds for any elements in the iterable.
Assert that two iterables produce equal sequences, with the same
semantics as
equal(a, b)
.
Create a new builder with the default environment variables.
Takes two iterables and creates a new iterator over both in sequence.
Create an iterator that clones each element from &T
to T
.
Combine all an iterator’s elements into one element by using
Extend
.
Create an iterator that maps for example iterators of
((A, B), C)
to (A, B, C)
.
Creates a new fair mutex in an unlocked state ready for use.
Creates a new mutex in an unlocked state ready for use.
Creates a new reentrant mutex in an unlocked state ready for use.
Creates a new instance of an RwLock<T>
which is unlocked.
Compares every element yielded by both
i
and
j
with the given function in lock-step and
returns a
Diff
which describes how
j
differs from
i
.
This is usually what you want.
It loads the .env file located in the environment’s current directory or its parents in sequence.
Like dotenv
, but returns an iterator over variables instead of loading into environment.
Iterate iterable
with a running index.
Return true
if both iterables produce equal sequences
(elements pairwise equal and sequences of the same length),
false
otherwise.
Escapes all regular expression meta characters in pattern
.
Perform a fold operation over the iterable.
Create a builder from the given environment variables.
Loads the specified file from the environment’s current directory or its parents in sequence.
Like from_filename
, but returns an iterator over variables instead of loading into environment.
Loads the file at the specified absolute path.
Like from_path
, but returns an iterator over variables instead of loading into environment.
Shortcut method to quickly make a GET
request.
Initializes the global logger with an env logger.
Initializes the global logger with an env logger from the given environment
variables.
Takes a shared reference to a lazy static and initializes
it if it has not been already.
Create an iterator that interleaves elements in i
and j
.
Iterate iterable
with a particular value inserted between each element.
Iterate iterable
with a particular value created by a function inserted
between each element.
Creates a new iterator that infinitely applies function to value and yields results.
Combine all iterator elements into one String
, separated by sep
.
Create an iterator that merges elements of the contained iterators using
the ordering function.
Create an iterator that merges elements of the contained iterators.
Returns a reference to the logger.
Return the maximum value of the iterable.
Returns the current maximum log level.
Create an iterator that merges elements in i
and j
.
Return an iterator adaptor that merge-joins items from the two base iterators in ascending order.
Return the minimum value of the iterable.
An iterator adaptor that allows the user to peek at multiple .next()
values without advancing the base iterator.
Converts an iterator of tuples into a tuple of containers.
An iterator that generalizes .zip()
and allows running multiple iterators in lockstep.
Partition a sequence using predicate pred
so that elements
that map to true
are placed before elements which map to false
.
A drop-in replacement for
std::iter::Peekable
which adds a
peek_nth
method allowing the user to
peek
at a value several iterations forward
without advancing the base iterator.
“Lift” a function of the values of an iterator so that it can process
an iterator of Result
values instead.
Create an iterator where you can put back a single item
Create an iterator where you can put back multiple values to the front
of the iteration.
Return an iterator inside a Rc<RefCell<_>>
wrapper.
Create an iterator that produces n
repetitions of element
.
Iterate iterable
in reverse.
Sets the global logger to a Box<Log>
.
Sets the global logger to a &'static Log
.
Sets the global maximum log level.
Sort all iterator elements into a new iterator in ascending order.
Sort all iterator elements into a new iterator in ascending order.
This sort is unstable (i.e., may reorder equal elements).
Spawns a new asynchronous task, returning a
JoinHandle
for it.
Attempts to initialize the global logger with an env logger.
Attempts to initialize the global logger with an env logger from the given
environment variables.
Creates a new unfold source with the specified closure as the “iterator
function” and an initial state to eventually pass to the closure
After loading the dotenv file, fetches the environment variable key from the current process.
After loading the dotenv file, returns an iterator of (variable, value) pairs of strings,
for all the environment variables of the current process.
Converts the arguments to iterators and zips them.
Zips two iterators but panics if they are not of the same length.
A 128-bit (16 byte) buffer containing the UUID.
An iterator adaptor that may join together adjacent elements.
An iterator adaptor that removes repeated duplicates.
An iterator adaptor that removes repeated duplicates, determining equality using a comparison function.
An iterator adaptor that removes repeated duplicates, while keeping a count of how many
repeated elements were present. This will determine equality using a comparison function.
An iterator adaptor that removes repeated duplicates, while keeping a count of how many
repeated elements were present.
An iterator adapter to filter out duplicate elements.
An iterator adapter to filter for duplicate elements.
A mutual exclusive primitive that is always fair, useful for protecting shared data
An RAII implementation of a “scoped lock” of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.
GroupingMapBy
is an intermediate struct for efficient group-and-fold operations.
An iterator adaptor to insert a particular value
between each element of the adapted iterator.
An iterator adaptor that merges an abitrary number of base iterators in ascending order.
If all base iterators are sorted (ascending), the result is sorted.
An iterator adapter to apply Into
conversion to each element.
An iterator adapter to apply a transformation within a nested Result::Ok
.
An RAII mutex guard returned by FairMutexGuard::map
, which can point to a
subfield of the protected data.
The result of mapping a local time to a concrete instant in a given time zone.
An RAII mutex guard returned by MutexGuard::map
, which can point to a
subfield of the protected data.
An RAII mutex guard returned by ReentrantMutexGuard::map
, which can point to a
subfield of the protected data.
An RAII read lock guard returned by RwLockReadGuard::map
, which can point to a
subfield of the protected data.
An RAII write lock guard returned by RwLockWriteGuard::map
, which can point to a
subfield of the protected data.
An iterator adaptor that merges the two base iterators in ascending order.
If both base iterators are sorted (ascending), the result is sorted.
An iterator adaptor that merge-joins items from the two base iterators in ascending order.
A mutual exclusion primitive useful for protecting shared data
An RAII implementation of a “scoped lock” of a mutex. When this structure is
dropped (falls out of scope), the lock will be unlocked.
Same as Result<T, ParseError>
.
A mutex which can be recursively locked by a single thread.
An RAII implementation of a “scoped lock” of a reentrant mutex. When this structure
is dropped (falls out of scope), the lock will be unlocked.
A reader-writer lock
RAII structure used to release the shared read access of a lock when
dropped.
RAII structure used to release the upgradable read access of a lock when
dropped.
RAII structure used to release the exclusive write access of a lock when
dropped.