pub struct MentorMessage {
pub severity: Severity,
pub plain_english: String,
pub technical_detail: String,
pub suggested_action: String,
}Expand description
A beginner-friendly explanation of a detected issue.
Every message carries a plain-English explanation, the underlying technical detail, and a concrete suggested action.
use limitless_cli::models::{MentorMessage, Severity};
let msg = MentorMessage {
severity: Severity::Warning,
plain_english: "Your Node version is outdated.".into(),
technical_detail: "Node 18 is EOL; latest LTS is 22.x.".into(),
suggested_action: "Install Node 22 via your version manager.".into(),
};
let json = serde_json::to_string(&msg).unwrap();
let back: MentorMessage = serde_json::from_str(&json).unwrap();
assert_eq!(back.severity, Severity::Warning);
assert_eq!(back.suggested_action, msg.suggested_action);Fields§
§severity: SeverityUrgency level of this message.
plain_english: StringFriendly, jargon-free description of the issue.
technical_detail: StringThe precise technical reason behind the issue.
suggested_action: StringA concrete step the user can take next.
Implementations§
Source§impl MentorMessage
impl MentorMessage
Sourcepub fn is_critical(&self) -> bool
pub fn is_critical(&self) -> bool
Whether this message needs immediate attention.
Trait Implementations§
Source§impl Clone for MentorMessage
impl Clone for MentorMessage
Source§impl Debug for MentorMessage
impl Debug for MentorMessage
Source§impl<'de> Deserialize<'de> for MentorMessage
impl<'de> Deserialize<'de> for MentorMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MentorMessage
Source§impl PartialEq for MentorMessage
impl PartialEq for MentorMessage
Source§impl Serialize for MentorMessage
impl Serialize for MentorMessage
impl StructuralPartialEq for MentorMessage
Auto Trait Implementations§
impl Forget for MentorMessage
impl Freeze for MentorMessage
impl RefUnwindSafe for MentorMessage
impl Send for MentorMessage
impl Sync for MentorMessage
impl Unpin for MentorMessage
impl UnsafeUnpin for MentorMessage
impl UnwindSafe for MentorMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more