Module prelude

Module prelude 

Source
Expand description

Typical imports.

Re-exports§

pub use super::deps;
pub use ::comfy_table;
pub use ::fastrand;
pub use ::howudoin;
pub use ::rayon;
pub use super::cmd::Output::*;

Macros§

anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
bail
Return early with an error.
cargs
Construct a [String] array from a list of arguments.
cmd
Helper to construct a Command with arguments.
ensure
Return early with an error if a condition is not satisfied.

Structs§

Args
Arguments iterator.
CSV
A CSV Format.
Date
Date in the proleptic Gregorian calendar.
Duration
A wrapper for duration that has FromStr implementation
Error
The Error type, a wrapper around a dynamic error type.
File
Wraps a std File which provides extra context for errors and buffered writing.
JSON
A json Format.
NumFmt
The number formatter configurations. See the module documentation for use.
OffsetDateTime
A PrimitiveDateTime with a UtcOffset.
PrimitiveDateTime
Combined date and time.
Receiver
The receiving end of a channel.
Regex
A compiled regular expression for searching Unicode haystacks.
Sender
A transmitting end of a channel.
TOML
A toml Format.
TablePrinter
This is the main interface for building a table. Each table consists of Rows, which in turn contain Cells.
Time
The clock time within a given date. Nanosecond precision.
Timestamp
A wrapper for SystemTime that has FromStr implementation
UtcOffset
An offset from UTC.

Enums§

JsonValue
Represents any valid JSON value.
Month
Months of the year.
Output
Describes the handling of a command execution for implementors of CommandExecute.
Weekday
Days of the week.

Traits§

CommandBuilder
Methods on Command which take self.
CommandExecute
Execute a command.
CommandString
Output Command as a text string, useful for debugging.
Context
Provides the context method for Result.
Deserialize
A data structure that can be deserialized from any data format supported by Serde.
DeserializeOwned
A data structure that can be deserialized without borrowing any data from the deserializer.
Format
Defines a structured format which can be used with ReadAs/WriteAs.
Itertools
An Iterator blanket implementation that provides extra adaptors and methods.
Read
The Read trait allows for reading bytes from a source.
ReadAs
A trait which gives any Reader the read_as function which can be used to read with a specific format.
Serialize
A data structure that can be serialized into any data format supported by Serde.
Write
A trait for objects which are byte-oriented sinks.
WriteAs
A trait which can supply write_as on a type to serialise it into a specific format and write it into a Writer.

Functions§

args
Get the command line Args.
bounded
Create a channel with a maximum capacity.
ls
List out the directory entries under path which match the glob pattern matching.
parse_duration
Parse duration object 1hour 12min 5s
unbounded
Create a channel with no maximum capacity.

Type Aliases§

CsvReader
CSV Reader backed by a File.
CsvWriter
CSV Writer backed by a File.
Result
Result<T, Error>

Derive Macros§

Deserialize
Serialize