pub struct TrialContext {
pub trial_id: TrialId,
pub trial: Arc<Trial>,
pub timestamp: Timestamp,
}Expand description
Read-only trial context passed to ElementRuntime lifecycle hooks.
Carries a reference to the owning Trial (defined in
paramodel-trials) so runtime implementations can read bound
parameter values and trial identity.
Fields§
§trial_id: TrialIdThe trial’s id.
trial: Arc<Trial>Shared reference to the trial. Cloning the Arc is cheap.
timestamp: TimestampObservation timestamp.
Trait Implementations§
Source§impl Clone for TrialContext
impl Clone for TrialContext
Source§fn clone(&self) -> TrialContext
fn clone(&self) -> TrialContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TrialContext
impl RefUnwindSafe for TrialContext
impl Send for TrialContext
impl Sync for TrialContext
impl Unpin for TrialContext
impl UnsafeUnpin for TrialContext
impl UnwindSafe for TrialContext
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