Skip to main content

Crate hyperlane_cli

Crate hyperlane_cli 

Source
Expand description

hyperlane-cli

A command-line tool for Hyperlane framework.

Re-exports§

pub use ::log;
pub use ::log;

Macros§

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§

Args
Parsed command line arguments
ColorContrast
Provides utilities for calculating and ensuring color contrast ratios.
ColorOutput
Represents a colored text output with formatting options.
ColorOutputBuilder
Builder pattern for constructing ColorOutput configurations.
ColorOutputList
Represents a list of ColorOutput configurations for sequential execution.
ColorOutputListBuilder
Builder pattern for constructing ColorOutputList configurations.
Logger
Custom logger implementation for the hyperlane-cli.
NewProjectConfig
Configuration for creating a new project
Task
Represents a collection of text tasks to be executed sequentially.
TemplateConfig
Configuration for template generation
Text
Configurable text display with color, background and style options.

Enums§

Color
Predefined color constants for easy text formatting.
ColorType
Represents different types of colors that can be used for text formatting.
CommandType
Available commands
DisplayType
Specifies whether color applies to text or background.
ModelSubType
Model subtypes for organizing data structures
NewError
Errors that can occur during project creation
TemplateError
Errors that can occur during template generation
TemplateType
Types of template components that can be generated

Constants§

COMMON_YEAR
Day count of every month in a common (non-leap) year.
DAYS
Abbreviated English weekday names, indexed by weekday number.
LANG_AR_SA_LOCALE
POSIX locale string of the Arabic (Saudi Arabia) UTF-8 encoding.
LANG_AR_SA_NAME
Human-readable name of the Arabic (Saudi Arabia) locale.
LANG_DE_DE_LOCALE
POSIX locale string of the German (Germany) UTF-8 encoding.
LANG_DE_DE_NAME
Human-readable name of the German (Germany) locale.
LANG_ENV_VAR
Environment variable holding the locale of the current session.
LANG_EN_US_LOCALE
POSIX locale string of the English (United States) UTF-8 encoding.
LANG_EN_US_NAME
Human-readable name of the English (United States) locale.
LANG_ES_ES_LOCALE
POSIX locale string of the Spanish (Spain) UTF-8 encoding.
LANG_ES_ES_NAME
Human-readable name of the Spanish (Spain) locale.
LANG_FI_FI_LOCALE
POSIX locale string of the Finnish (Finland) UTF-8 encoding.
LANG_FI_FI_NAME
Human-readable name of the Finnish (Finland) locale.
LANG_FR_FR_LOCALE
POSIX locale string of the French (France) UTF-8 encoding.
LANG_FR_FR_NAME
Human-readable name of the French (France) locale.
LANG_HI_IN_LOCALE
POSIX locale string of the Hindi (India) UTF-8 encoding.
LANG_HI_IN_NAME
Human-readable name of the Hindi (India) locale.
LANG_IT_IT_LOCALE
POSIX locale string of the Italian (Italy) UTF-8 encoding.
LANG_IT_IT_NAME
Human-readable name of the Italian (Italy) locale.
LANG_JA_JP_LOCALE
POSIX locale string of the Japanese (Japan) UTF-8 encoding.
LANG_JA_JP_NAME
Human-readable name of the Japanese (Japan) locale.
LANG_KO_KR_LOCALE
POSIX locale string of the Korean (South Korea) UTF-8 encoding.
LANG_KO_KR_NAME
Human-readable name of the Korean (South Korea) locale.
LANG_NL_NL_LOCALE
POSIX locale string of the Dutch (Netherlands) UTF-8 encoding.
LANG_NL_NL_NAME
Human-readable name of the Dutch (Netherlands) locale.
LANG_PT_PT_LOCALE
POSIX locale string of the Portuguese (Portugal) UTF-8 encoding.
LANG_PT_PT_NAME
Human-readable name of the Portuguese (Portugal) locale.
LANG_RU_RU_LOCALE
POSIX locale string of the Russian (Russia) UTF-8 encoding.
LANG_RU_RU_NAME
Human-readable name of the Russian (Russia) locale.
LANG_SV_SE_LOCALE
POSIX locale string of the Swedish (Sweden) UTF-8 encoding.
LANG_SV_SE_NAME
Human-readable name of the Swedish (Sweden) locale.
LANG_TH_TH_LOCALE
POSIX locale string of the Thai (Thailand) UTF-8 encoding.
LANG_TH_TH_NAME
Human-readable name of the Thai (Thailand) locale.
LANG_VI_VN_LOCALE
POSIX locale string of the Vietnamese (Vietnam) UTF-8 encoding.
LANG_VI_VN_NAME
Human-readable name of the Vietnamese (Vietnam) locale.
LANG_ZH_CN_LOCALE
POSIX locale string of the Chinese (China) UTF-8 encoding.
LANG_ZH_CN_NAME
Human-readable name of the Chinese (China) locale.
LEAP_YEAR
Day count of every month in a leap year.
MONTHS
Abbreviated English month names, indexed by month number minus one.

Traits§

ColorDisplay
Trait for converting colors to their ANSI escape sequences.

Functions§

__println_text
Prints a colored, timestamped block to the terminal.
calculate_time
Calculates the current year, month, day, hour, minute, second, millisecond and microsecond.
color256_bg_color
Generates color code for background colors in 256 colors.
color256_fg_color
Generates color code for foreground colors in 256 colors.
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.
execute_new
Execute new command to create a project from template
execute_template
Execute template generation
execute_watch
Execute watch command using notify crate to monitor file changes and re-run cargo run when source files are modified.
from_env_var
Gets the time zone offset from the system environment variable.
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.
output_list
Executes a sequence of output operations.
parse_args
Parse command line arguments
print_help
Print help message
print_version
Print version
rgb_bg_color
Generates color code for true color background colors.
rgb_fg_color
Generates color code for true color foreground colors.
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.