pub struct Recorded {
pub severity: String,
pub text: String,
pub fix: Option<FixJson>,
pub dependency: Option<DependencyJson>,
}Expand description
One diagnostic exactly as it was handed to the sink, so a replay goes through the same printing code the original run did rather than through a reconstruction of it. Reconstructing text from parsed fields is how a cache starts printing subtly different output from the run it claims to reproduce.
Fields§
§severity: StringSeverity::as_str’s word. A string rather than the enum
because an entry outlives the build that wrote it, and a word this build does not
know has to read back as itself rather than fail the whole entry.
text: StringThe finished line, position prefix and [htl <rule>] suffix included — what the
sink was handed, not what it was assembled from.
fix: Option<FixJson>The fix the diagnostic carried, for htl fix replaying instead of re-checking.
None when the diagnostic had none, which is most of them.
dependency: Option<DependencyJson>Set when the text is an error in a module this one required rather than in this one: the dependency and the file that required it. The entry carries every such error the check found; the sink decides at replay, as it did at the original run, which of them to say (once per run). Absent in entries written before this field existed, which then read as having none.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Recorded
impl<'de> Deserialize<'de> for Recorded
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>,
Auto Trait Implementations§
impl Freeze for Recorded
impl RefUnwindSafe for Recorded
impl Send for Recorded
impl Sync for Recorded
impl Unpin for Recorded
impl UnsafeUnpin for Recorded
impl UnwindSafe for Recorded
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more