Re-exports§
pub use menu::*;
pub use ast::*;
pub use parser::*;
pub use ctx::*;
pub use runtime::*;
pub use repository::*;
Modules§
Macros§
- choice! macro
- divider! macro prints a divider as per max width while also allowing to set text left center or right. can print curved box drawing characters like ╭,╮,╰,╯,┌,┐,└,┘,├,┤,┬,┴,┼ e.g.
divider!()
=> ───────────────────────────────────────────────────────────── e.g.divider!("hello",-)
=> ─ hello ───────────────────────────────────────────────────── e.g.divider!(-,"hello")
=> ───────────────────────────────────────────────────── hello ─ e.g.divider!(-,"hello",-)
=> ─────────────────────────── hello ─────────────────────────── e.g.divider!(-,"hello",-,"world",-)
=> ─ hello ─ world ───────────────────────────────────────────── e.g.divider!(/,"hello",-)
=> ╭─ hello ──────────────────────────────────────────────────── e.g.divider!(\,"hello",-)
=> ╰─ hello ──────────────────────────────────────────────────── e.g.divider!(/,"hello",\)
=> ╭─ hello ───────────────────────────────────────────────────╮ e.g.divider!(\,"hello",\)
=> ╰─ hello ───────────────────────────────────────────────────╮ e.g.divider!(\,"hello",/)
=> ╰─ hello ───────────────────────────────────────────────────╯ e.g.divider!(-,/)
=> ────────────────────────────────────────────────────────────╯ e.g.divider!(/,-)
=> ╭─────────────────────────────────────────────────────────── e.g.divider!(\,-)
=> ╰─────────────────────────────────────────────────────────── e.g.divider!(\,-,/)
=> ╰───────────────────────────────────────────────────────────╯ e.g.divider!(=,"hello")
=> ════════════════════════════════════════════════════ hello ═ e.g.divider!(=,"hello",=)
=> ═════════════════════════ hello ════════════════════════════ e.g.divider!(=,"hello",=,"world",=)
=> ═ hello ═ world ════════════════════════════════════════════ - paragraph! macro prints a paragraph with a title and text the text is automatically wrapped to the max width as per the max width set
- render!
- selection! macro
- tree! macro prints a tree of the provided serializable object eg. tree!(json!({“hello”:“world”})) prints:
Structs§
- CStyleSequence a sequence of CStyle
- Choice
- Holds configuration options for wrapping and filling text.
Enums§
- Supported line endings. Like in the Rust standard library, two line endings are supported:
\r\n
and\n
- Describes where words occur in a line of text.
- The
WordSplitter
enum describes where words can be split. - Describes how to wrap words into lines.
Constants§
Traits§
- Pickable a trait that can be used to implement a pickable item
- Printable
Functions§
- Removes common leading whitespace from each line.
- disable raw mode disable raw mode on stdin (no external dependencies)
- divider prints a divider as per max width
- divider_vibrant prints a divider with vibrant colors e.g.
divider_vibrant()
───────────────────────────────────────────────────────────────── - enable raw mode enable raw mode on stdin (no external dependencies)
- Fill a line of text at a given width.
- Fill
text
in-place without reallocating the input string. - get_max_width
- Indent each line by the given prefix.
- print_framed prints the provided text in a frame of x,y,w,h e.g.
print_framed(0,0,10,10,"hello world")
prints “hello world” in a frame at the provided position automatically wraps the text to fit the width of the frame - print_positioned prints the provided text at the provided position offseted by the provided x and y values from the current position x and y can be negative to move the cursor to the left or up e.g.
print_positioned(0,0,"hello world")
prints “hello world” at the current position - Refill a paragraph of wrapped text with a new width.
- set_max_width
- ask question
- Unpack a paragraph of already-wrapped text.
- Wrap a line of text at a given width.
- Wrap text into columns with a given total width.