Module prelude

Module prelude 

Source

Re-exports§

pub use crate::cli::Command;
pub use crate::io::ext::LengthRead;
pub use crate::io::LineProcessor;
pub use crate::io::ObjectWriter;
pub use crate::util::Timer;
pub use crate::layout::*;

Macros§

anyhow
Construct an ad-hoc error from a string or existing non-anyhow error value.
debug
Logs a message at the debug level.
error
Logs a message at the error level.
info
Logs a message at the info level.
log
The standard logging macro.
log_enabled
Determines if a message logged at the specified level in that module will be logged.
trace
Logs a message at the trace level.
warn
Logs a message at the warn level.

Structs§

Metadata
Metadata about a log message.
MetadataBuilder
Builder for Metadata.
ParseLevelError
The type returned by from_str when the string doesn’t match any of the log levels.
Path
A slice of a path (akin to str).
PathBuf
An owned, mutable path (akin to String).
Record
The “payload” of a log message.
RecordBuilder
Builder for Record.
SetLoggerError
The type returned by set_logger if set_logger has already been called.

Enums§

Level
An enum representing the available verbosity levels of the logger.
LevelFilter
An enum representing the available verbosity level filters of the logger.

Constants§

STATIC_MAX_LEVEL
The statically resolved maximum log level.

Traits§

Args
Parse a set of arguments into a user-defined container.
FallibleIterator
An Iterator-like trait that allows for calculation of items to fail.
Log
A trait encapsulating the operations required of a logger.

Functions§

logger
Returns a reference to the logger.
max_level
Returns the current maximum log level.
set_boxed_logger
Sets the global logger to a Box<Log>.
set_logger
Sets the global logger to a &'static Log.
set_logger_racy
A thread-unsafe version of set_logger.
set_max_level
Sets the global maximum log level.
set_max_level_racy
A thread-unsafe version of set_max_level.

Type Aliases§

Result
Result<T, Error>

Derive Macros§

Args
Generates the Args impl.