Skip to main content

ClosureReading

Enum ClosureReading 

Source
pub enum ClosureReading {
    Measured {
        residual: f64,
        bar: f64,
        spans: usize,
        at_depth_limit: usize,
    },
    Unmeasured {
        reason: &'static str,
        spans: usize,
        faces_read: usize,
        faces: usize,
    },
    Open {
        residual: f64,
        faces: usize,
    },
}
Expand description

What a shell’s closure scan came back with — a measurement, or nothing.

The reason this is a type rather than a float: NaN is a value, and a value gets folded into a comparison. ShellVectorArea::is_over_bar is residual() > bar, and NaN > bar is FALSE, so a shell the scan gave up on reads exactly like a shell that closed — the worst possible answer, since the scan gave up on the bodies whose geometry is hardest. A caller that matches on this cannot make that mistake without writing the arm.

Variants§

§

Measured

The trims were integrated to the end. at_depth_limit spans were accepted at the bisection’s depth limit rather than because they converged; their last difference is inside quadrature_error either way.

Fields

§residual: f64
§bar: f64
§spans: usize
§at_depth_limit: usize
§

Unmeasured

No residual exists for this shell: the scan stopped before it had read every face, and a partial sum of a boundary integral is not a smaller version of the answer.

Fields

§reason: &'static str
§spans: usize
§faces_read: usize
§faces: usize
§

Open

An OPEN shell is not judged by this check at all: Σ ∫ n dA = 0 is a statement about a closed one, and an open shell’s residual is its own boundary’s vector area, which is a fact about the sheet.

Fields

§residual: f64
§faces: usize

Trait Implementations§

Source§

impl Clone for ClosureReading

Source§

fn clone(&self) -> Self

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 Copy for ClosureReading

Source§

impl Debug for ClosureReading

Source§

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

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

impl Serialize for ClosureReading

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more