murmur
A flexible library to build messages with NerdFonts or Unicode icons.
Table of Contents
Intro
There is only a Whisper struct and an IconKind enum.
use ;
IconKind Variants
The IconKind enum variants map to a specific Unicode or NerdFont icon, each icon has a default color.
Casing conforms to Rust API Guidelines.
NfFaTimesNfFaCheckNfFaInfoCircleNfFaRefreshNfFaWarningNfFaBugUnicodeCrossMarkUnicodeCheckMarkUnicodeInformationSourceUnicodeGearUnicodeWarningSignUnicodeBug
For a full list of the currently supported icons, see the IconKind enum.
use ;
use OwoColorize;
new
.icon
.message
.message
.whisper
.unwrap;
Whisper methods:
The Whisper struct provides the following methods:
new(): Creates a newWhisperinstance.icon(): Adds an icon to theWhisperinstance.message(): Adds a message to theWhisperinstance.messages(): Adds multiple messages to theWhisperinstance.whisper(): Builds theWhisperinstance and prints the messages
Here are some examples of how to use the Whisper struct.
new
use ;
new
.icon
.message
.whisper
.ok;
icon
use ;
new.icon.whisper.ok;
message
use Whisper;
use ;
Output:
1 message without icon
2 message without icon indents by 2 spaces all messages after the first
3 message
messages
use Whisper;
new
.messages
.whisper
.ok;
new
.messages
.whisper
.ok;
Whisper Error
The whisper method returns -> Result<(), WhisperError>
use ;
use ;