Skip to main content

RosterRule

Enum RosterRule 

Source
pub enum RosterRule {
    R445,
    Amoeba,
    Builder,
    Clouds,
    Coral,
    Crystal,
    Pyroclastic,
    SlowDecay,
}
Expand description

The closed roster of named rules. Each entry’s notation in the comment is survive/birth/states/neighbourhood, as the 3D automaton catalogues write it; every one is held by every_roster_rule_lives_from_its_own_seed to a live fraction strictly inside (0, 0.9) at generations 100 and 400.

Variants§

§

R445

4/4/5/M: a sparse ball that burns out to a few still cells.

§

Amoeba

9-26/5-7,12-13,15/5/M: a sparse field that swells into a mass filling most of the cube.

§

Builder

2,6,9/4,6,8-9/10/M: a burst of long-decaying growth that leaves a still scatter of cells behind.

§

Clouds

13-26/13-14,17-19/2/M: a dense field that settles into rounded clouds.

§

Coral

5-8/6-7,9,12/4/M: a slowly churning reef with a skin of decaying cells.

§

Crystal

0-6/1,3/2/VN: a small seed growing into a lattice that fills most of the cube.

§

Pyroclastic

4-7/6-8/10/M: a restless, never-settling foam of cells and long decay.

§

SlowDecay

1,4,8,11,13-26/13-26/5/M: a dense field that freezes almost at once.

Implementations§

Source§

impl RosterRule

Source

pub const ALL: [RosterRule; 8]

Every roster rule, in the order the generated reference lists them.

Source

pub fn from_name(name: &str) -> Option<Self>

Parse a roster name, or None.

Source

pub fn as_str(self) -> &'static str

The name a preset writes — from_name’s inverse.

Source

pub fn seed(self) -> (f32, f32)

The seed this rule lives from, as (seed_radius, seed_fill): what an absent [voxel] seed_radius and seed_fill mean when the list opens with this rule. A 3D rule is particular about its seed — clouds survives only a dense field and dies from a sparse one, where crystal grows from a small sparse ball.

Source

pub fn rule(self) -> Rule

The compiled rule.

Trait Implementations§

Source§

impl Clone for RosterRule

Source§

fn clone(&self) -> RosterRule

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RosterRule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RosterRule

Source§

fn eq(&self, other: &RosterRule) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RosterRule

Source§

impl Eq for RosterRule

Source§

impl StructuralPartialEq for RosterRule

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,