pub enum BodyKind {
Solid,
Sheet,
Cellular,
Wire,
}Expand description
The kind a body DECLARES, as distinct from the kind topology_kind
READS from its edge uses. Nothing infers it: a producer sets it, the wire
carries it, and consumers that branch by kind (the boolean’s operand gate
first) read the declaration. Every body built today is Solid, the
default, and a Solid serialises byte for byte as before: the JSON skips
the key, the flat codec keeps its version-1.0 header (solid_codec.rs).
Variants§
Solid
A closed 2-manifold (every non-degenerate edge used exactly twice): today’s only body, every rule unchanged.
Sheet
An open shell or a lone face: edges may bound one face (lamina).
Cellular
Cells sharing walls: edges may bound three or more faces (spine).
Wire
Edges and vertices, no faces.
Implementations§
Source§impl BodyKind
impl BodyKind
Sourcepub fn is_solid(&self) -> bool
pub fn is_solid(&self) -> bool
true for the default kind; the JSON skip_serializing_if predicate.
Sourcepub fn codec_code(self) -> f64
pub fn codec_code(self) -> f64
The codec slot: Solid 0, Sheet 1, Cellular 2, Wire 3.
Sourcepub fn from_codec_code(code: f64) -> Option<Self>
pub fn from_codec_code(code: f64) -> Option<Self>
The inverse of BodyKind::codec_code; None for any other value.
Trait Implementations§
impl Copy for BodyKind
Source§impl<'de> Deserialize<'de> for BodyKind
impl<'de> Deserialize<'de> for BodyKind
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 BodyKind
impl StructuralPartialEq for BodyKind
Auto Trait Implementations§
impl Freeze for BodyKind
impl RefUnwindSafe for BodyKind
impl Send for BodyKind
impl Sync for BodyKind
impl Unpin for BodyKind
impl UnsafeUnpin for BodyKind
impl UnwindSafe for BodyKind
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.