pub enum IrTypeExpr {
Named(String),
Primitive(IrPrimitive),
StringLiteral(String),
StringEnum(Vec<String>),
Array(Box<IrTypeExpr>),
Map(Box<IrTypeExpr>),
Union(Vec<IrTypeExpr>),
Nullable(Box<IrTypeExpr>),
Any,
}Expand description
A type expression that replaces ObjectOrReference<ObjectSchema> everywhere.
Fully resolved — no $ref wrappers, no spec-version-specific types.
Variants§
Named(String)
Reference to a named schema (by its key in IrSpec.schemas).
Primitive(IrPrimitive)
A primitive type (string, integer, number, boolean, etc.).
StringLiteral(String)
A literal string value (e.g., "SimpleA"). Used for single-value string enums
when they appear as union members.
StringEnum(Vec<String>)
Inline string enum (e.g., "active" | "inactive"). Used for multi-value string
enums in property types that don’t warrant a separate named schema.
Array(Box<IrTypeExpr>)
Array of items.
Map(Box<IrTypeExpr>)
Map with string keys and typed values (the additionalProperties pattern).
Union(Vec<IrTypeExpr>)
Inline union of types (e.g. OAS 3.1 type: [string, integer]).
Distinct from IrSchemaKind::Union which is a named schema-level union.
Nullable(Box<IrTypeExpr>)
Nullable wrapper — the inner type can also be null.
Any
Truly untyped / any value.
Trait Implementations§
Source§impl Clone for IrTypeExpr
impl Clone for IrTypeExpr
Source§fn clone(&self) -> IrTypeExpr
fn clone(&self) -> IrTypeExpr
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 IrTypeExpr
impl Debug for IrTypeExpr
impl Eq for IrTypeExpr
Source§impl PartialEq for IrTypeExpr
impl PartialEq for IrTypeExpr
Source§impl Serialize for IrTypeExpr
impl Serialize for IrTypeExpr
impl StructuralPartialEq for IrTypeExpr
Auto Trait Implementations§
impl Freeze for IrTypeExpr
impl RefUnwindSafe for IrTypeExpr
impl Send for IrTypeExpr
impl Sync for IrTypeExpr
impl Unpin for IrTypeExpr
impl UnsafeUnpin for IrTypeExpr
impl UnwindSafe for IrTypeExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.