Module trim

Module trim 

Source

Structs§

Ignore
Useful for debug purposes, or for quick code. Bypasses the grid restrictions entirely. Does absolutely nothing to the text. This could potentially lead to bad formatting. Bad formatting is what this crate is designed to prevent.
Split
This split splits the text into different lines, each of which fit just fine. It also adds blank space to any short lines to make sure every bit of blank space is refreshed.
TrimmedText
Trimmed text is text that is marked as processed and displayable. It is only public so that users can create TrimStrategy objects other than the 3 provided. It is not meant to be manually be created by anything other than a TrimStrategy.
Truncate
The trim strategy cuts out anything that doesn’t fit into the box in order to deal with grid restrictions. It also adds blank space to any short lines to make sure every bit of blank space is refreshed.

Enums§

FormatError
Represents a formatting problem. Contains the original inputted string, restored as close to its original glory as possible. Note that some of the information in the string may be lost. Currently, there’s only one variant of this error, indicating a lack of space.

Traits§

DisplayAndDebug
This trait is used for debug purposes. T implements DisplayAndDebug iff T implements Display and T implements Debug.
TrimStrategy
A TrimStrategy can be used to trim inputs down into TrimmedText