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.
- Output
Builder - Builder pattern for constructing Output configurations.
- Output
List - Represents a list of Output configurations for sequential execution.
- Output
List Builder - Builder pattern for constructing OutputList configurations.
Enums§
- Color
- Predefined color constants for easy text formatting.
- Color
Type - 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.