pub enum EntityReference {
Plane {
plane_id: Uuid,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
Face {
face_id: Uuid,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
Edge {
inner: EdgeSpecifier,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
Vertex {
side_faces: Vec<Uuid>,
index: Option<u32>,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
Solid2d {
solid2d_id: Uuid,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
Solid3d {
solid3d_id: Uuid,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
Solid2dEdge {
edge_id: Uuid,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
Segment {
path_id: Uuid,
segment_id: Uuid,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
Region {
region_id: Uuid,
topology_fallback: Option<PrimitiveTopologyFallback>,
},
}Expand description
An edge/vertex can be defined by the faces that it is connected to.
Variants§
Plane
A uuid referencing a plane.
Fields
topology_fallback: Option<PrimitiveTopologyFallback>Optional primitive topology on a parent (not used for planes today).
Face
A uuid referencing a face.
Fields
topology_fallback: Option<PrimitiveTopologyFallback>Fallback: solid3d UUID + face index on that body when face_id cannot be resolved client-side.
Edge
A collection of ids that uniquely identify an edge.
Fields
inner: EdgeSpecifierFlattened edge reference (side_faces, end_faces, index).
topology_fallback: Option<PrimitiveTopologyFallback>Fallback: solid3d UUID + edge index on that body for 3D BREP edges (distinct from inner.index).
Vertex
A collection of ids that uniquely identify an vertex.
Fields
topology_fallback: Option<PrimitiveTopologyFallback>Fallback: solid3d UUID + vertex index on that body.
Solid2d
A uuid referencing a solid2d (profile).
Fields
topology_fallback: Option<PrimitiveTopologyFallback>Typically omitted: solid2d_id is already the owning profile. Present for schema parity with other variants.
Solid3d
A uuid referencing a solid3d (body).
Fields
topology_fallback: Option<PrimitiveTopologyFallback>Typically omitted: solid3d_id is already the owning body. Present for schema parity with other variants.
Solid2dEdge
A uuid referencing an edge on a solid2d (profile) - used for raw sketch/profile edges. This is distinct from the face-based Edge reference which is used for BRep/swept body edges.
Fields
topology_fallback: Option<PrimitiveTopologyFallback>Fallback: solid2d UUID + curve index in that profile.
Segment
A single segment (curve) within a path.
Fields
topology_fallback: Option<PrimitiveTopologyFallback>Fallback: path UUID + segment curve index.
Region
A closed sketch region/profile area.
Fields
topology_fallback: Option<PrimitiveTopologyFallback>Fallback: path UUID + region index on that path.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for EntityReference
impl<'arbitrary> Arbitrary<'arbitrary> for EntityReference
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for EntityReference
impl Clone for EntityReference
Source§fn clone(&self) -> EntityReference
fn clone(&self) -> EntityReference
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EntityReference
impl Debug for EntityReference
Source§impl<'de> Deserialize<'de> for EntityReference
impl<'de> Deserialize<'de> for EntityReference
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>,
Source§impl JsonSchema for EntityReference
impl JsonSchema for EntityReference
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for EntityReference
impl PartialEq for EntityReference
Source§fn eq(&self, other: &EntityReference) -> bool
fn eq(&self, other: &EntityReference) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for EntityReference
impl Serialize for EntityReference
impl StructuralPartialEq for EntityReference
Source§impl TS for EntityReference
impl TS for EntityReference
Source§type WithoutGenerics = EntityReference
type WithoutGenerics = EntityReference
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = EntityReference
type OptionInnerType = EntityReference
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read moreSource§fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Freeze for EntityReference
impl RefUnwindSafe for EntityReference
impl Send for EntityReference
impl Sync for EntityReference
impl Unpin for EntityReference
impl UnsafeUnpin for EntityReference
impl UnwindSafe for EntityReference
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more