#[cfg(not(feature = "std"))]
use alloc::{boxed::Box, string::String};
#[cfg(feature = "std")]
use std::{boxed::Box, string::String};
use crate::{LogLine, Status};
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct GhostRecord {
pub inner: Box<LogLine>,
pub status: Status,
pub reason: Option<String>,
}
impl GhostRecord {
pub fn from(mut line: LogLine, reason: Option<String>) -> Self {
line.status = Status::Ghost;
GhostRecord {
inner: Box::new(line),
status: Status::Ghost,
reason,
}
}
}