Skip to main content

Crate safe_string

Crate safe_string 

Source

Structs§

ControlCharError
An error indicating that a control character was found in a string when constructing a [SafeString].
DotCharError
An error indicating that an unsafe DOT character was found in a string when constructing a DotSafe.
DotSafe
A safe string type that prevents Graphviz DOT injection attacks.
TermSafe
A safe string type that prevents terminal control injection attacks.

Functions§

contains_control_characters
Returns true if s contains any control characters.
contains_dot_unsafe_characters
Returns true if s contains any characters unsafe for Graphviz DOT format.
is_control_character
Returns true if c is a control character that could affect terminal state.
is_dot_unsafe_character
Returns true if c is unsafe inside a Graphviz DOT string literal.