pub(super) struct FeatureSorter {
steps: Box<[FeatureStepData]>,
}Expand description
Cached vanilla ordering for all placed features reachable from a biome source.
Fields§
§steps: Box<[FeatureStepData]>Implementations§
Source§impl FeatureSorter
impl FeatureSorter
pub(super) fn build(possible_biomes: &[BiomeRef], registry: &Registry) -> Self
pub(super) fn step_count(&self) -> usize
pub(super) fn step(&self, step: usize) -> Option<&FeatureStepData>
fn topological_sort( edges: &BTreeMap<FeatureVertex, BTreeSet<FeatureVertex>>, ) -> Vec<FeatureVertex>
fn visit( vertex: FeatureVertex, edges: &BTreeMap<FeatureVertex, BTreeSet<FeatureVertex>>, discovered: &mut BTreeSet<FeatureVertex>, visiting: &mut BTreeSet<FeatureVertex>, sorted: &mut Vec<FeatureVertex>, ) -> bool
fn from_sorted_features( sorted_features: &[FeatureVertex], possible_biomes: &[BiomeRef], registry: &Registry, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FeatureSorter
impl !UnwindSafe for FeatureSorter
impl Freeze for FeatureSorter
impl Send for FeatureSorter
impl Sync for FeatureSorter
impl Unpin for FeatureSorter
impl UnsafeUnpin for FeatureSorter
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>