pub enum KclValueView {
Show 27 variants
Uuid {
value: Uuid,
},
Bool {
value: bool,
},
Number {
value: f64,
ty: NumericType,
},
String {
value: String,
},
Enum {
enum_name: String,
variant: String,
},
SketchVar {
value: Box<SketchVarView>,
},
SketchConstraint {
value: Value,
},
Tuple {
value: Vec<KclValueView>,
},
HomArray {
value: Vec<KclValueView>,
},
Object {
value: IndexMap<String, KclValueView>,
constrainable: bool,
},
TagIdentifier {
value: String,
},
TagDeclarator {
value: String,
},
GdtAnnotation {
value: Box<GdtAnnotationView>,
},
CameraView {
value: Value,
},
NamedView {
value: Value,
},
Plane {
value: Box<PlaneView>,
},
Face {
value: Box<FaceView>,
},
BoundedEdge {
value: BoundedEdgeView,
},
Segment {
value: Value,
},
Sketch {
value: Box<SketchView>,
},
Solid {
value: Box<SolidView>,
},
Helix {
value: Box<HelixView>,
},
ImportedGeometry(ImportedGeometryView),
Function {},
Module {
value: ModuleId,
},
Type {
experimental: bool,
},
KclNone {},
}Expand description
A serializable, presentational view of any KCL value.
This type deliberately contains no executor state. Runtime values are
converted to it by kcl-lib before they cross an API boundary.
Variants§
Uuid
Bool
Number
String
Enum
Exposed by nominal identity, not by the variant’s representation.
SketchVar
Fields
§
value: Box<SketchVarView>SketchConstraint
Sketch constraints are currently only shown in the debug memory pane.
Tuple
Fields
§
value: Vec<KclValueView>HomArray
An array where all values have a shared type.
Fields
§
value: Vec<KclValueView>Object
TagIdentifier
TagDeclarator
GdtAnnotation
Fields
§
value: Box<GdtAnnotationView>CameraView
Camera values are currently only shown in the debug memory pane.
NamedView
Named views are consumed through the artifact graph, not program memory.
Plane
Face
BoundedEdge
Fields
§
value: BoundedEdgeViewSegment
Standalone segments are currently only shown in the debug memory pane.
Sketch
Fields
§
value: Box<SketchView>Solid
Helix
ImportedGeometry(ImportedGeometryView)
Function
Module
Type
KclNone
Trait Implementations§
Source§impl Clone for KclValueView
impl Clone for KclValueView
Source§fn clone(&self) -> KclValueView
fn clone(&self) -> KclValueView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KclValueView
impl Debug for KclValueView
Source§impl<'de> Deserialize<'de> for KclValueView
impl<'de> Deserialize<'de> for KclValueView
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KclValueView, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KclValueView, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<KclValue> for KclValueView
impl From<KclValue> for KclValueView
Source§impl JsonSchema for KclValueView
impl JsonSchema for KclValueView
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for KclValueView
impl PartialEq for KclValueView
Source§impl Serialize for KclValueView
impl Serialize for KclValueView
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for KclValueView
Source§impl TS for KclValueView
impl TS for KclValueView
Source§type WithoutGenerics = KclValueView
type WithoutGenerics = KclValueView
If this type does not have generic parameters, then
The only requirement for these dummy types is that
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 = KclValueView
type OptionInnerType = KclValueView
If the implementing type is
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>
JSDoc comment to describe this type in TypeScript - when
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
Declaration of this type using the supplied generic arguments.
The resulting TypeScript definition will not be generic. For that, see
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
Declaration of this type, e.g.
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
Formats this types definition in TypeScript, e.g
{ 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
Flatten a type declaration.
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
KclValueView: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
KclValueView: 'static,
Iterates over all type parameters of this type.
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
Returns the output path to where
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
KclValueView: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
KclValueView: 'static,
Iterates over all dependency of this type.
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Resolves all dependencies of this type recursively.
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
Manually export this type to the filesystem.
To export this type together with all of its dependencies, use
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,
Manually export this type to the filesystem, together with all of its dependencies.
To export only this type, without its dependencies, use
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 KclValueView
impl RefUnwindSafe for KclValueView
impl Send for KclValueView
impl Sync for KclValueView
impl Unpin for KclValueView
impl UnsafeUnpin for KclValueView
impl UnwindSafe for KclValueView
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = !
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Scalar for T
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.