pub enum MessageLevel {
Info,
Warning,
Error,
Debug,
}Expand description
Represents the severity level of a task message.
MessageLevel categorizes messages generated during task execution by their importance
and purpose. This allows consumers to filter, route, or display messages appropriately
based on their severity. The levels follow common logging conventions, from informational
messages to debug output.
§Variants
-
Info- Informational messages that describe normal task execution progress or state. These messages provide context about what the task is doing but don’t indicate any issues. -
Warning- Warning messages that indicate potential issues or non-ideal conditions that don’t prevent task success. These should be reviewed but don’t require immediate action. -
Error- Error messages that indicate serious problems, typically associated with task failures. These messages describe what went wrong during execution. -
Debug- Debug messages that provide detailed technical information useful for troubleshooting and development. These are typically more verbose and technical than other message types.
§Example
use genja_core::task::{TaskMessage, MessageLevel};
let info = TaskMessage::new(MessageLevel::Info, "Starting configuration deployment");
let warning = TaskMessage::new(MessageLevel::Warning, "Using deprecated API endpoint");
let error = TaskMessage::new(MessageLevel::Error, "Failed to connect to device");
let debug = TaskMessage::new(MessageLevel::Debug, "Raw response: {...}");Variants§
Trait Implementations§
Source§impl Clone for MessageLevel
impl Clone for MessageLevel
Source§fn clone(&self) -> MessageLevel
fn clone(&self) -> MessageLevel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more