pub enum RecordingBackend {
Ast,
Vm,
}Expand description
Which backend produced a recording.
A trace is written by cove run --trace, by a built binary, and by a
benchmark, and all of them run a program on one of the evaluators this
toolchain has. The header names which, so that cove replay can run the
recording on the backend that made it without inferring anything, and can
say so when it was told to do otherwise. ADR 0026 is the decision and its
reasoning.
A closed set rather than free text, spelled with the names --backend
accepts, so a reader that meets an unknown name refuses the file rather
than carrying a string it cannot act on.
Variants§
Ast
The tree-walking interpreter, which ADR 0012 keeps as the oracle.
Vm
The linear-memory backend of ADR 0034, which is what runs a program.
Between ADR 0034’s cutover and the rename that followed it, this
backend was spelled lvm here, and a trace recorded in that window
says so. Such a file is not read: RecordingBackend::parse refuses
lvm the way it refuses any other name, and cove replay reports it
as a header it cannot read. That is the trade issue #240 took
deliberately when it chose to delete the predecessor first and rename
second — the window is measured in commits, the format version had
already moved to 4 in the same cutover, and a trace is a recording of
a run that can be taken again. Nothing was built to accept the old
spelling: an alias would make a name that is scheduled to mean
nothing readable forever.
Implementations§
Source§impl RecordingBackend
impl RecordingBackend
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The name this backend is written under in a trace header, which is
also the name --backend accepts for it.
Sourcepub fn parse(text: &str) -> Option<RecordingBackend>
pub fn parse(text: &str) -> Option<RecordingBackend>
Parses the name RecordingBackend::as_str produces.
Trait Implementations§
Source§impl Clone for RecordingBackend
impl Clone for RecordingBackend
Source§fn clone(&self) -> RecordingBackend
fn clone(&self) -> RecordingBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RecordingBackend
Source§impl Debug for RecordingBackend
impl Debug for RecordingBackend
Source§impl Display for RecordingBackend
impl Display for RecordingBackend
impl Eq for RecordingBackend
Source§impl PartialEq for RecordingBackend
impl PartialEq for RecordingBackend
Source§fn eq(&self, other: &RecordingBackend) -> bool
fn eq(&self, other: &RecordingBackend) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RecordingBackend
Auto Trait Implementations§
impl Freeze for RecordingBackend
impl RefUnwindSafe for RecordingBackend
impl Send for RecordingBackend
impl Sync for RecordingBackend
impl Unpin for RecordingBackend
impl UnsafeUnpin for RecordingBackend
impl UnwindSafe for RecordingBackend
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.