pub enum SeedRefresh {
Once,
EachStage,
}Expand description
When a RegionSeed::Tools seed runs again.
Every other seed kind resolves once, at spawn, and this defaults to the same: a region seeded from the filesystem or a literal has no reason to be re-read, and re-running a call on every stage entry costs a tool call and rewrites a region the cache was holding still.
EachStage is for the seeds where the answer moves.
A clock is the clear case: a run that spends an hour in one stage and then
enters another should date the second stage from when it started, not from
when the run did.
Variants§
Once
Resolve once, at spawn. The default, and what every other seed does.
EachStage
Resolve again whenever a stage is entered, replacing the region.
Implementations§
Source§impl SeedRefresh
impl SeedRefresh
Sourcepub fn from_str_loose(value: &str) -> Option<Self>
pub fn from_str_loose(value: &str) -> Option<Self>
Parse the manifest spelling, or None for a word that is neither.
A wrong spelling is rejected rather than defaulted, so
refresh = "each stage" is reported instead of quietly meaning once -
which would read as the feature not working.
Trait Implementations§
Source§impl Clone for SeedRefresh
impl Clone for SeedRefresh
Source§fn clone(&self) -> SeedRefresh
fn clone(&self) -> SeedRefresh
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SeedRefresh
Source§impl Debug for SeedRefresh
impl Debug for SeedRefresh
Source§impl Default for SeedRefresh
impl Default for SeedRefresh
Source§fn default() -> SeedRefresh
fn default() -> SeedRefresh
Source§impl<'de> Deserialize<'de> for SeedRefresh
impl<'de> Deserialize<'de> for SeedRefresh
Source§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>,
impl Eq for SeedRefresh
Source§impl PartialEq for SeedRefresh
impl PartialEq for SeedRefresh
Source§impl Serialize for SeedRefresh
impl Serialize for SeedRefresh
impl StructuralPartialEq for SeedRefresh
Auto Trait Implementations§
impl Freeze for SeedRefresh
impl RefUnwindSafe for SeedRefresh
impl Send for SeedRefresh
impl Sync for SeedRefresh
impl Unpin for SeedRefresh
impl UnsafeUnpin for SeedRefresh
impl UnwindSafe for SeedRefresh
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.