pub struct NewTuneWrite {Show 15 fields
pub response_level: ResponseLevel,
pub written_at: DateTime<Utc>,
pub kind: WriteKind,
pub allow_uncertain_quality: bool,
pub previous: Option<WriteReadback>,
pub proportional_written: Option<f32>,
pub integral_written: Option<f32>,
pub derivative_written: Option<f32>,
pub proportional_readback: Option<f32>,
pub integral_readback: Option<f32>,
pub derivative_readback: Option<f32>,
pub success: bool,
pub error_message: Option<String>,
pub rollback_state: Option<RollbackState>,
pub rollback_error: Option<String>,
}Expand description
Everything needed to record one write-back attempt, successful or not. Built up by the
caller as it works through the sequential pre-read / write-and-verify / rollback steps,
then persisted in a single TuneWriteRow::insert call – replacing the old two-outcome
insert_success/insert_failure split, which could not represent a partial write or a
rollback attempt at all. See safety-writeback-rollback in AGENTS.md for the four
distinguishable outcomes this shape exists to capture.
Fields§
§response_level: ResponseLevel§written_at: DateTime<Utc>§kind: WriteKind§allow_uncertain_quality: bool§previous: Option<WriteReadback>§proportional_written: Option<f32>§integral_written: Option<f32>§derivative_written: Option<f32>§proportional_readback: Option<f32>§integral_readback: Option<f32>§derivative_readback: Option<f32>§success: bool§error_message: Option<String>§rollback_state: Option<RollbackState>§rollback_error: Option<String>Implementations§
Source§impl NewTuneWrite
impl NewTuneWrite
Sourcepub fn new(response_level: ResponseLevel, written_at: DateTime<Utc>) -> Self
pub fn new(response_level: ResponseLevel, written_at: DateTime<Utc>) -> Self
Starts a record with every previous/written/readback/rollback field unset and
kind = WriteKind::Write. New production write/revert operations must overwrite
allow_uncertain_quality with the policy captured when that operation began; the
permissive default keeps direct repository/test construction backward-compatible.
Trait Implementations§
Source§impl Clone for NewTuneWrite
impl Clone for NewTuneWrite
Source§fn clone(&self) -> NewTuneWrite
fn clone(&self) -> NewTuneWrite
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NewTuneWrite
impl Debug for NewTuneWrite
Source§impl PartialEq for NewTuneWrite
impl PartialEq for NewTuneWrite
Source§fn eq(&self, other: &NewTuneWrite) -> bool
fn eq(&self, other: &NewTuneWrite) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NewTuneWrite
Auto Trait Implementations§
impl Freeze for NewTuneWrite
impl RefUnwindSafe for NewTuneWrite
impl Send for NewTuneWrite
impl Sync for NewTuneWrite
impl Unpin for NewTuneWrite
impl UnsafeUnpin for NewTuneWrite
impl UnwindSafe for NewTuneWrite
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more