pub enum PrimitiveKind {
String,
Integer,
Number,
Bool,
}Expand description
JSON Schema’s type keyword values, minus the variants that have
their own IR shapes (object / array / null). The format
keyword and any width/semantic refinement (int32 / int64 /
float / double / date / uuid / byte / decimal / etc.)
land on PrimitiveConstraints::format_extension verbatim.
Plugins decide whether to produce a richer target-language type
based on the format string. This keeps the IR uniform and
orthogonal — adding new formats never requires an IR/WIT/bindgen
roundtrip.
Variants§
String
JSON Schema type: "string".
Integer
JSON Schema type: "integer". Width refinements
(int32 / int64) live in format_extension.
Number
JSON Schema type: "number". Width refinements
(float / double) and decimal live in format_extension.
Bool
JSON Schema type: "boolean".
Trait Implementations§
Source§impl Clone for PrimitiveKind
impl Clone for PrimitiveKind
Source§fn clone(&self) -> PrimitiveKind
fn clone(&self) -> PrimitiveKind
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 PrimitiveKind
impl Debug for PrimitiveKind
Source§impl<'de> Deserialize<'de> for PrimitiveKind
impl<'de> Deserialize<'de> for PrimitiveKind
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for PrimitiveKind
impl Hash for PrimitiveKind
Source§impl PartialEq for PrimitiveKind
impl PartialEq for PrimitiveKind
Source§fn eq(&self, other: &PrimitiveKind) -> bool
fn eq(&self, other: &PrimitiveKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PrimitiveKind
impl Serialize for PrimitiveKind
impl Copy for PrimitiveKind
impl Eq for PrimitiveKind
impl StructuralPartialEq for PrimitiveKind
Auto Trait Implementations§
impl Freeze for PrimitiveKind
impl RefUnwindSafe for PrimitiveKind
impl Send for PrimitiveKind
impl Sync for PrimitiveKind
impl Unpin for PrimitiveKind
impl UnsafeUnpin for PrimitiveKind
impl UnwindSafe for PrimitiveKind
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