pub struct GhostRecord {
pub inner: Box<LogLine>,
pub status: Status,
pub reason: Option<String>,
}Expand description
Registro forense de um LogLine abandonado.
Preserva o LogLine original que foi abandonado (não commitado) para análise forense.
O status é sempre Ghost e pode incluir uma razão opcional do abandono.
§Exemplo
use logline_core::*;
let line = LogLine::builder()
.who("did:ubl:alice")
.did(Verb::Deploy)
.when(1_735_671_234)
.if_ok(Outcome { label: "ok".into(), effects: vec![] })
.if_doubt(Escalation { label: "doubt".into(), route_to: "qa".into() })
.if_not(FailureHandling { label: "not".into(), action: "rollback".into() })
.build_draft()?;
let ghost = line.abandon(Some("user_cancelled".into()))?;
assert_eq!(ghost.status, Status::Ghost);
assert_eq!(ghost.reason, Some("user_cancelled".into()));Fields§
§inner: Box<LogLine>O LogLine original que foi abandonado.
status: StatusStatus do registro (sempre Ghost).
reason: Option<String>Razão opcional do abandono (para análise forense).
Implementations§
Trait Implementations§
Source§impl Clone for GhostRecord
impl Clone for GhostRecord
Source§fn clone(&self) -> GhostRecord
fn clone(&self) -> GhostRecord
Returns a duplicate 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 GhostRecord
impl Debug for GhostRecord
Source§impl<'de> Deserialize<'de> for GhostRecord
impl<'de> Deserialize<'de> for GhostRecord
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 GhostRecord
impl PartialEq for GhostRecord
Source§impl Serialize for GhostRecord
impl Serialize for GhostRecord
impl StructuralPartialEq for GhostRecord
Auto Trait Implementations§
impl Freeze for GhostRecord
impl RefUnwindSafe for GhostRecord
impl Send for GhostRecord
impl Sync for GhostRecord
impl Unpin for GhostRecord
impl UnwindSafe for GhostRecord
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