pub struct TerminalDiagnostic {
pub id: TerminalDiagnosticId,
pub severity: TerminalDiagnosticSeverity,
pub kind: TerminalDiagnosticKind,
pub message: String,
pub source_range: TerminalSourceRange,
pub file_location: Option<TerminalFileLocation>,
pub links: Vec<TerminalDiagnosticLink>,
pub command_id: Option<CommandId>,
}Expand description
One classified terminal-output issue or navigation hint.
Fields are intentionally serializable and publicly constructible; their cross-field consistency is not validated.
§Examples
use ailloli_ui_terminal_core::{TerminalDiagnostic, TerminalDiagnosticId, TerminalDiagnosticKind, TerminalDiagnosticSeverity, TerminalSourceRange};
let diagnostic = TerminalDiagnostic { id: TerminalDiagnosticId(1), severity: TerminalDiagnosticSeverity::Info, kind: TerminalDiagnosticKind::Url, message: "URL".into(), source_range: TerminalSourceRange::single(0), file_location: None, links: vec![], command_id: None };
assert_eq!(diagnostic.id.0, 1);Fields§
§id: TerminalDiagnosticIdIdentity assigned within the latest classification.
severity: TerminalDiagnosticSeverityPresentation priority.
kind: TerminalDiagnosticKindPattern that produced the diagnostic.
message: StringHuman-readable summary; may be empty for manually built values.
source_range: TerminalSourceRangeInclusive global terminal line range.
file_location: Option<TerminalFileLocation>Optional parsed file location.
links: Vec<TerminalDiagnosticLink>Zero or more actionable links.
command_id: Option<CommandId>Shell command correlated by output range, when found.
Trait Implementations§
Source§impl Clone for TerminalDiagnostic
impl Clone for TerminalDiagnostic
Source§fn clone(&self) -> TerminalDiagnostic
fn clone(&self) -> TerminalDiagnostic
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TerminalDiagnostic
impl Debug for TerminalDiagnostic
Source§impl<'de> Deserialize<'de> for TerminalDiagnostic
impl<'de> Deserialize<'de> for TerminalDiagnostic
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
Source§impl PartialEq for TerminalDiagnostic
impl PartialEq for TerminalDiagnostic
Source§impl Serialize for TerminalDiagnostic
impl Serialize for TerminalDiagnostic
impl Eq for TerminalDiagnostic
impl StructuralPartialEq for TerminalDiagnostic
Auto Trait Implementations§
impl Freeze for TerminalDiagnostic
impl RefUnwindSafe for TerminalDiagnostic
impl Send for TerminalDiagnostic
impl Sync for TerminalDiagnostic
impl Unpin for TerminalDiagnostic
impl UnwindSafe for TerminalDiagnostic
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