error

Macro error 

Source
macro_rules! error {
    ($($arg:tt)+) => { ... };
}
Expand description

Logs an error to Duat

Use this, as opposed to warn!, info! or debug!, if you want to tell the user that something explicitely failed, and they need to find a workaround, like failing to write to/read from a buffer, for example.

This error follows the same construction as the txt! macro, and will create a Record inside of the Logs, which can be accessed by anyone, at any time.

The Record added to the Logs is related to log::Record, from the log crate. But it differs in the sense that it is always 'static, and instead of having an std::fmt::Arguments inside, it contains a Text, making it a better fit for Duat.

The connection to log::Record also means that external libraries can log information using the log crate, and it will also show up in Duat’s Logss, but reformatted to be a Text instead.