pub enum AnyObject<F: Form> {
Curve(F::Form<Curve>),
Cycle(F::Form<Cycle>),
Face(F::Form<Face>),
HalfEdge(F::Form<HalfEdge>),
Region(F::Form<Region>),
Shell(F::Form<Shell>),
Sketch(F::Form<Sketch>),
Solid(F::Form<Solid>),
Surface(F::Form<Surface>),
Vertex(F::Form<Vertex>),
}
Expand description
An enum that can hold any object
This enum is generic over the form that the object takes. An
AnyObject<Bare>
contains a bare objects, for example Curve
. An
AnyObject<Stored>
contains a handle referencing a stored object,
for example Handle<Curve>
.
Variants§
Curve(F::Form<Curve>)
A curve
Cycle(F::Form<Cycle>)
A cycle
Face(F::Form<Face>)
A face
HalfEdge(F::Form<HalfEdge>)
A half-edge
Region(F::Form<Region>)
A region
Shell(F::Form<Shell>)
A shell
Sketch(F::Form<Sketch>)
A sketch
Solid(F::Form<Solid>)
A solid
Surface(F::Form<Surface>)
A surface
Vertex(F::Form<Vertex>)
A vertex
Implementations§
source§impl AnyObject<Stored>
impl AnyObject<Stored>
sourcepub fn validate(
&self,
config: &ValidationConfig,
errors: &mut Vec<ValidationError>,
geometry: &Geometry
)
pub fn validate( &self, config: &ValidationConfig, errors: &mut Vec<ValidationError>, geometry: &Geometry )
Validate the object with a pre-defined validation configuration
Trait Implementations§
source§impl From<AnyObject<AboutToBeStored>> for AnyObject<Stored>
impl From<AnyObject<AboutToBeStored>> for AnyObject<Stored>
source§fn from(object: AnyObject<AboutToBeStored>) -> Self
fn from(object: AnyObject<AboutToBeStored>) -> Self
Converts to this type from the input type.
source§impl<F: Ord + Form> Ord for AnyObject<F>
impl<F: Ord + Form> Ord for AnyObject<F>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<F: PartialEq + Form> PartialEq for AnyObject<F>
impl<F: PartialEq + Form> PartialEq for AnyObject<F>
source§impl<F: PartialOrd + Form> PartialOrd for AnyObject<F>where
F::Form<Curve>: PartialOrd,
F::Form<Cycle>: PartialOrd,
F::Form<Face>: PartialOrd,
F::Form<HalfEdge>: PartialOrd,
F::Form<Region>: PartialOrd,
F::Form<Shell>: PartialOrd,
F::Form<Sketch>: PartialOrd,
F::Form<Solid>: PartialOrd,
F::Form<Surface>: PartialOrd,
F::Form<Vertex>: PartialOrd,
impl<F: PartialOrd + Form> PartialOrd for AnyObject<F>where
F::Form<Curve>: PartialOrd,
F::Form<Cycle>: PartialOrd,
F::Form<Face>: PartialOrd,
F::Form<HalfEdge>: PartialOrd,
F::Form<Region>: PartialOrd,
F::Form<Shell>: PartialOrd,
F::Form<Sketch>: PartialOrd,
F::Form<Solid>: PartialOrd,
F::Form<Surface>: PartialOrd,
F::Form<Vertex>: PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<F: Eq + Form> Eq for AnyObject<F>
impl<F: Form> StructuralPartialEq for AnyObject<F>
Auto Trait Implementations§
impl<F> Freeze for AnyObject<F>where
<F as Form>::Form<Curve>: Freeze,
<F as Form>::Form<Cycle>: Freeze,
<F as Form>::Form<Face>: Freeze,
<F as Form>::Form<HalfEdge>: Freeze,
<F as Form>::Form<Region>: Freeze,
<F as Form>::Form<Shell>: Freeze,
<F as Form>::Form<Sketch>: Freeze,
<F as Form>::Form<Solid>: Freeze,
<F as Form>::Form<Surface>: Freeze,
<F as Form>::Form<Vertex>: Freeze,
impl<F> RefUnwindSafe for AnyObject<F>where
<F as Form>::Form<Curve>: RefUnwindSafe,
<F as Form>::Form<Cycle>: RefUnwindSafe,
<F as Form>::Form<Face>: RefUnwindSafe,
<F as Form>::Form<HalfEdge>: RefUnwindSafe,
<F as Form>::Form<Region>: RefUnwindSafe,
<F as Form>::Form<Shell>: RefUnwindSafe,
<F as Form>::Form<Sketch>: RefUnwindSafe,
<F as Form>::Form<Solid>: RefUnwindSafe,
<F as Form>::Form<Surface>: RefUnwindSafe,
<F as Form>::Form<Vertex>: RefUnwindSafe,
impl<F> Send for AnyObject<F>where
<F as Form>::Form<Curve>: Send,
<F as Form>::Form<Cycle>: Send,
<F as Form>::Form<Face>: Send,
<F as Form>::Form<HalfEdge>: Send,
<F as Form>::Form<Region>: Send,
<F as Form>::Form<Shell>: Send,
<F as Form>::Form<Sketch>: Send,
<F as Form>::Form<Solid>: Send,
<F as Form>::Form<Surface>: Send,
<F as Form>::Form<Vertex>: Send,
impl<F> Sync for AnyObject<F>where
<F as Form>::Form<Curve>: Sync,
<F as Form>::Form<Cycle>: Sync,
<F as Form>::Form<Face>: Sync,
<F as Form>::Form<HalfEdge>: Sync,
<F as Form>::Form<Region>: Sync,
<F as Form>::Form<Shell>: Sync,
<F as Form>::Form<Sketch>: Sync,
<F as Form>::Form<Solid>: Sync,
<F as Form>::Form<Surface>: Sync,
<F as Form>::Form<Vertex>: Sync,
impl<F> Unpin for AnyObject<F>where
<F as Form>::Form<Curve>: Unpin,
<F as Form>::Form<Cycle>: Unpin,
<F as Form>::Form<Face>: Unpin,
<F as Form>::Form<HalfEdge>: Unpin,
<F as Form>::Form<Region>: Unpin,
<F as Form>::Form<Shell>: Unpin,
<F as Form>::Form<Sketch>: Unpin,
<F as Form>::Form<Solid>: Unpin,
<F as Form>::Form<Surface>: Unpin,
<F as Form>::Form<Vertex>: Unpin,
impl<F> UnwindSafe for AnyObject<F>where
<F as Form>::Form<Curve>: UnwindSafe,
<F as Form>::Form<Cycle>: UnwindSafe,
<F as Form>::Form<Face>: UnwindSafe,
<F as Form>::Form<HalfEdge>: UnwindSafe,
<F as Form>::Form<Region>: UnwindSafe,
<F as Form>::Form<Shell>: UnwindSafe,
<F as Form>::Form<Sketch>: UnwindSafe,
<F as Form>::Form<Solid>: UnwindSafe,
<F as Form>::Form<Surface>: UnwindSafe,
<F as Form>::Form<Vertex>: UnwindSafe,
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.