Struct TrialDelta
pub struct TrialDelta {
pub seq: u64,
pub trial: FrozenTrial,
}Expand description
One change to one trial, as seen through
Storage::sync.
M1 keeps this coarse: a delta is a whole-trial snapshot plus a sequence
number. That is all the in-memory backend needs, and it makes the merge in
StudyView::apply a replace.
The journal backend (M2) may refine the wire format into finer-grained ops
(param written, value reported); it will still be able to present them
as whole-trial deltas here, so this type is not a dead end.
Fields§
§seq: u64Monotonically increasing sequence number within the study. A
Cursor is compared against it.
trial: FrozenTrialThe trial’s state after the change.
Implementations§
§impl TrialDelta
impl TrialDelta
pub const fn new(seq: u64, trial: FrozenTrial) -> Self
pub const fn new(seq: u64, trial: FrozenTrial) -> Self
Wraps a snapshot as a delta.
Trait Implementations§
§impl Clone for TrialDelta
impl Clone for TrialDelta
§fn clone(&self) -> TrialDelta
fn clone(&self) -> TrialDelta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TrialDelta
impl Debug for TrialDelta
§impl<'de> Deserialize<'de> for TrialDelta
impl<'de> Deserialize<'de> for TrialDelta
§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
§impl PartialEq for TrialDelta
impl PartialEq for TrialDelta
§impl Serialize for TrialDelta
impl Serialize for TrialDelta
impl StructuralPartialEq for TrialDelta
Auto Trait Implementations§
impl Freeze for TrialDelta
impl RefUnwindSafe for TrialDelta
impl Send for TrialDelta
impl Sync for TrialDelta
impl Unpin for TrialDelta
impl UnsafeUnpin for TrialDelta
impl UnwindSafe for TrialDelta
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