Struct ReserveAndCreateRequest
pub struct ReserveAndCreateRequest {
pub study: StudyId,
pub max_trials: Option<u64>,
pub template: Option<TrialTemplate>,
pub operation: OperationId,
}Expand description
Fields§
§study: StudyIdThe study receiving the new trial.
max_trials: Option<u64>The maximum number of durably created records, or None for no limit.
template: Option<TrialTemplate>Optional fixed parameters or parent lineage for the new trial.
operation: OperationIdThe lifecycle operation this call belongs to, for cross-process
correlation. OperationId::NONE when the caller has none — an honest
gap, never a fabricated correlation.
Implementations§
§impl ReserveAndCreateRequest
impl ReserveAndCreateRequest
pub const fn new(study: StudyId, max_trials: Option<u64>) -> Self
pub const fn new(study: StudyId, max_trials: Option<u64>) -> Self
Creates an empty-template reservation request.
pub fn with_template(self, template: TrialTemplate) -> Self
pub fn with_template(self, template: TrialTemplate) -> Self
Adds a creation template to the request.
pub const fn with_operation(self, operation: OperationId) -> Self
pub const fn with_operation(self, operation: OperationId) -> Self
Tags the request with the lifecycle operation it belongs to.
Defaulted rather than required: a backend must work for a caller with no correlation to offer, and a required id would only ever be satisfied with a fresh one that correlates nothing.
Trait Implementations§
§impl Clone for ReserveAndCreateRequest
impl Clone for ReserveAndCreateRequest
§fn clone(&self) -> ReserveAndCreateRequest
fn clone(&self) -> ReserveAndCreateRequest
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 ReserveAndCreateRequest
impl Debug for ReserveAndCreateRequest
§impl PartialEq for ReserveAndCreateRequest
impl PartialEq for ReserveAndCreateRequest
impl StructuralPartialEq for ReserveAndCreateRequest
Auto Trait Implementations§
impl Freeze for ReserveAndCreateRequest
impl RefUnwindSafe for ReserveAndCreateRequest
impl Send for ReserveAndCreateRequest
impl Sync for ReserveAndCreateRequest
impl Unpin for ReserveAndCreateRequest
impl UnsafeUnpin for ReserveAndCreateRequest
impl UnwindSafe for ReserveAndCreateRequest
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