Struct Restart
#[non_exhaustive]pub struct Restart {
pub mode: RestartMode,
pub seed: u64,
}Expand description
The restart a Restart child carries.
Read by the objective through
TrialCtx::restart.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mode: RestartModeHow the child restarts.
seed: u64The child’s restart seed, seed_for(study_seed, child_number, Stream::Restart), for re-initialization or perturbation noise.
Implementations§
§impl Restart
impl Restart
pub const fn new(mode: RestartMode, seed: u64) -> Self
pub const fn new(mode: RestartMode, seed: u64) -> Self
A restart of mode under seed.
Trait Implementations§
impl Copy for Restart
§impl<'de> Deserialize<'de> for Restart
impl<'de> Deserialize<'de> for Restart
§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 StructuralPartialEq for Restart
Auto Trait Implementations§
impl Freeze for Restart
impl RefUnwindSafe for Restart
impl Send for Restart
impl Sync for Restart
impl Unpin for Restart
impl UnsafeUnpin for Restart
impl UnwindSafe for Restart
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