Skip to main content

Module constants

Module constants 

Source
Expand description

Common constants used throughout the library.

This module contains configuration values and limits that help ensure secure and efficient operation of the library.

§Examples

use html_generator::constants::{DEFAULT_LANGUAGE, DEFAULT_MAX_INPUT_SIZE};

assert_eq!(DEFAULT_LANGUAGE, "en-GB");
assert!(DEFAULT_MAX_INPUT_SIZE > 0);

Constants§

DEFAULT_LANGUAGE
Default language code for HTML generation (British English).
DEFAULT_MAX_INPUT_SIZE
Maximum allowed input size (5MB) to prevent denial of service attacks.
DEFAULT_SYNTAX_THEME
Default syntax highlighting theme (github).
LANGUAGE_CODE_PATTERN
Regular expression pattern for validating language codes.
MAX_PATH_LENGTH
Maximum file path length.
MIN_INPUT_SIZE
Minimum required input size (1KB) for meaningful processing.