Mojo module
fmt
Text formatting: traits for writing types as human-readable UTF-8 strings.
The fmt package provides traits that control how types format themselves as
text and where that text gets written. The Writable trait describes how a
type converts itself to UTF-8 text, while the Writer trait accepts formatted
output from writable types. Together, they enable efficient formatting without
unnecessary allocations by directly to destinations like files, strings, or
network sockets.
Use this package to implement custom text formatting for your types, control output representation, or write formatted data directly to various destinations.
Traitsโ
- โ
Writable: TheWritabletrait describes how a type is written into aWriter. - โ
Writer: Describes a type that can be written to by any type that implements thewrite_tofunction.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!