Skip to main content

RecordingBackend

Enum RecordingBackend 

Source
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

Source

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.

Source

pub fn parse(text: &str) -> Option<RecordingBackend>

Parses the name RecordingBackend::as_str produces.

Trait Implementations§

Source§

impl Clone for RecordingBackend

Source§

fn clone(&self) -> RecordingBackend

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RecordingBackend

Source§

impl Debug for RecordingBackend

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for RecordingBackend

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RecordingBackend

Source§

impl PartialEq for RecordingBackend

Source§

fn eq(&self, other: &RecordingBackend) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RecordingBackend

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.