Crate color_output

Source
Expand description

color-output

An atomic output library based on Rust that supports output functionalities through functions, builders, and other methods. It allows customization of text and background colors.

Macros§

__print_message_common
Internal macro for handling common message printing logic.
output_macro
Macro for outputting colored text to the terminal.
println_error
Prints an error message with red background and white text.
println_success
Prints a success message with green background and white text.
println_warning
Prints a warning message with yellow background and white text.

Structs§

Output
Represents a colored text output with formatting options.
OutputBuilder
Builder pattern for constructing Output configurations.
OutputList
Represents a list of Output configurations for sequential execution.
OutputListBuilder
Builder pattern for constructing OutputList configurations.

Enums§

Color
Predefined color constants for easy text formatting.
ColorType
Represents different types of colors that can be used for text formatting.

Constants§

COMMON_YEAR
Common Year
DAYS
Days
LEAP_YEAR
Leap Year
MONTHS
Months

Functions§

calculate_time
Calculates the current year, month, day, hour, minute, second, millisecond and microsecond.
compute_date
Computes the year, month, and day from days since Unix epoch (1970-01-01).
date
Gets the current day, without the time.
day
Gets the current day.
gmt
Gets the current date and time in GMT format.
hour
Gets the current hour.
is_leap_year
Determines if a year is a leap year.
micros
Gets the current timestamp in microseconds.
millis
Gets the current timestamp in milliseconds.
minute
Gets the current minute.
month
Gets the current month.
output
Executes the output operation with the given formatting.
second
Gets the current second.
time
Gets the current time, including the date and time.
time_micros
Gets the current time with microseconds, including the date and time.
time_millis
Gets the current time with milliseconds, including the date and time.
timestamp
Gets the current timestamp in seconds since Unix epoch.
timestamp_micros
Gets the current timestamp in microseconds since Unix epoch.
timestamp_millis
Gets the current timestamp in milliseconds since Unix epoch.
year
Gets the current year.