Skip to main content

RegionRefusal

Enum RegionRefusal 

Source
pub enum RegionRefusal {
Show 15 variants NoSuchRegion(RegionId), SameRegion(RegionId), NotAdjacent(RegionId, RegionId), PathTooShort, NotAnEdgeOfTheRegion(u32, u32), DoesNotCut { pieces: usize, }, ConstraintDoesNotApply { kind: SurfaceKind, constraint: &'static str, }, InvalidRadius(f64), TooFewVertices { kind: SurfaceKind, needed: usize, found: usize, }, NoFit(SurfaceKind), DoesNotVerify { kind: SurfaceKind, deviation: f64, distance: f64, }, TriangleOffTheSurface { kind: SurfaceKind, triangle: usize, }, NotADisk, TooNarrowForAPatch, PatchDoesNotVerify,
}
Expand description

Why a step on the regions was refused. The regions are unchanged.

Variants§

§

NoSuchRegion(RegionId)

No region has this name, or it holds no triangle (a merge retired it).

§

SameRegion(RegionId)

A region cannot be merged with itself.

§

NotAdjacent(RegionId, RegionId)

The two regions share no mesh edge.

§

PathTooShort

A path needs at least two vertices.

§

NotAnEdgeOfTheRegion(u32, u32)

Two consecutive vertices of the path are not the ends of an edge of the region’s triangles.

§

DoesNotCut

Cut along the path, the region falls into this many pieces, not two.

Fields

§pieces: usize

How many pieces the path leaves.

§

ConstraintDoesNotApply

The kind of surface has no such thing to hold fixed.

Fields

§kind: SurfaceKind

The kind asked for.

§constraint: &'static str

The constraint, "axis" or "radius".

§

InvalidRadius(f64)

A fixed radius that is not a finite positive distance.

§

TooFewVertices

The region has too few vertices to determine the kind.

Fields

§kind: SurfaceKind

The kind asked for.

§needed: usize

How many it needs.

§found: usize

How many the region has.

§

NoFit(SurfaceKind)

No surface of the kind could be fitted to the vertices at all.

§

DoesNotVerify

The fitted surface misses a vertex by more than the coplanar distance.

Fields

§kind: SurfaceKind

The kind asked for.

§deviation: f64

The worst distance from a vertex to it.

§distance: f64

The coplanar distance it had to be within.

§

TriangleOffTheSurface

A triangle’s middle stands off the fitted surface by more than its sag allows: its corners are on the surface and it spans off it.

Fields

§kind: SurfaceKind

The kind asked for.

§triangle: usize

The triangle, an index into MeshRegions::triangles.

§

NotADisk

A patch needs a region that is one disk bounded by one loop; this one has a hole or touches itself.

§

TooNarrowForAPatch

Too few of the region’s vertices lie inside its boundary to hold a patch across it.

§

PatchDoesNotVerify

No patch fitted to the region passed the verification: within the coplanar distance of every vertex and across every triangle, its normal agreeing with theirs.

Trait Implementations§

Source§

impl Clone for RegionRefusal

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 Debug for RegionRefusal

Source§

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

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

impl Display for RegionRefusal

Source§

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

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

impl Error for RegionRefusal

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for RegionRefusal

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RegionRefusal

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.