pub struct Recorder(/* private fields */);trace only.Expand description
Records the exchanges of the transports it wraps. Cheap to clone; clones
share the log. Wrap a transport (Recorder::wrap), hand it to the
dialogs (with_transport), run the client, then take
Recorder::trace.
Implementations§
Source§impl Recorder
impl Recorder
Sourcepub fn new() -> Self
pub fn new() -> Self
An empty recorder with a fresh random Salt that is never
written: its pseudonyms are consistent within its trace and link to
no other trace. The default.
Sourcepub fn with_salt(salt: Salt) -> Self
pub fn with_salt(salt: Salt) -> Self
An empty recorder whose pseudonyms are keyed by salt: every trace
recorded with the same salt gives a reference or ID the same
pseudonym. Account identifiers still get aliases of this trace
only; the salt does not reach them.
Sourcepub fn wrap(&self, inner: SharedTransport) -> SharedTransport
pub fn wrap(&self, inner: SharedTransport) -> SharedTransport
A transport that sends through inner and records every exchange
(redacted) in this recorder, in the order the sends finish.
Sourcepub fn exchanges(&self) -> Vec<Exchange>
pub fn exchanges(&self) -> Vec<Exchange>
The exchanges so far, redacted but not anonymised. Unknown segments show only their header and the length of each element.
Sourcepub fn unknown_segments(&self) -> Vec<UnknownSegment>
pub fn unknown_segments(&self) -> Vec<UnknownSegment>
The segments of the dialog so far that the recorder has no field
list for, one entry per code and version. A trace shows only their
header and element lengths, which is rarely enough to support a bank
that sends them. Show the examples to the person recording; the
codes they agree to go to Recorder::trace_keeping.
Sourcepub fn accounts(&self) -> Vec<TraceAccount>
pub fn accounts(&self) -> Vec<TraceAccount>
The accounts seen so far, in alias order.
Sourcepub fn trace(&self) -> Trace
pub fn trace(&self) -> Trace
The exchanges so far, anonymised (Trace::from_exchanges), with
the accounts they name. Unknown segments show only their header and
the length of each element.
Sourcepub fn trace_keeping(&self, codes: &[&str]) -> Trace
pub fn trace_keeping(&self, codes: &[&str]) -> Trace
Recorder::trace in which the unknown segments with these codes
stay as the bank sent them, unmasked. Only for codes whose examples
(Recorder::unknown_segments) a person has read.
Sourcepub fn account_of(&self, account: &AccountInfo) -> Option<TraceAccount>
pub fn account_of(&self, account: &AccountInfo) -> Option<TraceAccount>
The alias and description the recorder gives account (same IBAN
or the same number, subaccount and BLZ as a HIUPD account it has
seen), e.g. account #2 (class checking; Kontoart 1; jobs HKSAL HKKAZ).