MCPcopy Create free account
hub / github.com/hashintel/hash / push

Method push

libs/@local/hashql/diagnostics/src/issues.rs:542–545  ·  view source on GitHub ↗

Adds a diagnostic to the collection. # Examples ``` use hashql_diagnostics::{Diagnostic, DiagnosticIssues, Label, Severity}; # use hashql_diagnostics::category::TerminalDiagnosticCategory; # const CATEGORY: TerminalDiagnosticCategory = TerminalDiagnosticCategory { # id: "example", name: "Example" # }; let mut issues = DiagnosticIssues::new(); issues .push(Diagnostic::new(CATEGORY, Severity:

(&mut self, diagnostic: Diagnostic<C, S, K>)

Source from the content-addressed store, hash-verified

540 /// assert_eq!(issues.critical(), 1);
541 /// ```
542 pub fn push(&mut self, diagnostic: Diagnostic<C, S, K>) {
543 self.critical += usize::from(diagnostic.severity.is_critical());
544 self.diagnostics.push(diagnostic);
545 }
546
547 /// Removes and returns the last diagnostic.
548 ///

Callers

nothing calls this directly

Calls 2

fromFunction · 0.70
pushMethod · 0.65

Tested by

no test coverage detected