pub enum DataType<X: Extension = NoExt> {
Show 36 variants
Boolean {
spelling: BooleanTypeName,
meta: Meta,
},
TinyInt {
display_width: Option<u32>,
meta: Meta,
},
SmallInt {
display_width: Option<u32>,
meta: Meta,
},
MediumInt {
display_width: Option<u32>,
meta: Meta,
},
Integer {
spelling: IntegerTypeName,
display_width: Option<u32>,
meta: Meta,
},
BigInt {
display_width: Option<u32>,
meta: Meta,
},
Decimal {
spelling: DecimalTypeName,
precision: Option<i32>,
scale: Option<i32>,
meta: Meta,
},
Float {
precision: Option<u32>,
meta: Meta,
},
Real {
meta: Meta,
},
Double {
spelling: DoubleTypeName,
meta: Meta,
},
Text {
spelling: TextTypeName,
charset: Option<Box<CharsetAnnotation>>,
meta: Meta,
},
Blob {
spelling: BlobTypeName,
meta: Meta,
},
Character {
spelling: CharacterTypeName,
size: Option<u32>,
charset: Option<Box<CharsetAnnotation>>,
meta: Meta,
},
Binary {
spelling: BinaryTypeName,
size: Option<u32>,
meta: Meta,
},
Bit {
varying: bool,
size: Option<u32>,
meta: Meta,
},
Json {
meta: Meta,
},
Uuid {
meta: Meta,
},
Date {
meta: Meta,
},
Time {
spelling: TimeTypeName,
precision: Option<u32>,
time_zone: TimeZone,
meta: Meta,
},
Timestamp {
spelling: TimestampTypeName,
precision: Option<u32>,
time_zone: TimeZone,
meta: Meta,
},
Interval {
fields: Option<IntervalFields>,
precision: Option<u32>,
meta: Meta,
},
Enum {
values: ThinVec<Literal>,
charset: Option<Box<CharsetAnnotation>>,
meta: Meta,
},
Set {
values: ThinVec<Literal>,
charset: Option<Box<CharsetAnnotation>>,
meta: Meta,
},
NumericModifier {
element: Option<Box<DataType<X>>>,
signedness: Signedness,
zerofill: bool,
meta: Meta,
},
Array {
element: Box<DataType<X>>,
size: Option<u32>,
spelling: ArrayTypeSpelling,
meta: Meta,
},
Struct {
fields: ThinVec<StructTypeField<X>>,
spelling: StructTypeSpelling,
meta: Meta,
},
Union {
members: ThinVec<StructTypeField<X>>,
meta: Meta,
},
Map {
key: Box<DataType<X>>,
value: Box<DataType<X>>,
meta: Meta,
},
Wrapped {
kind: WrappedTypeKind,
inner: Box<DataType<X>>,
meta: Meta,
},
FixedString {
length: u32,
meta: Meta,
},
DateTime64 {
precision: u32,
timezone: Option<Box<Literal>>,
meta: Meta,
},
Nested {
fields: ThinVec<StructTypeField<X>>,
meta: Meta,
},
FixedWidthInt {
signed: bool,
width: IntWidth,
meta: Meta,
},
UserDefined {
name: ObjectName,
modifiers: ThinVec<Literal>,
meta: Meta,
},
Liberal {
words: ThinVec<Ident>,
args: ThinVec<u32>,
meta: Meta,
},
Other {
ext: X,
meta: Meta,
},
}Expand description
SQL data types in the M1 AST surface.
Variants intentionally keep spelling tags where common dialects spell the
same canonical type differently (INT vs INTEGER, VARCHAR vs
CHARACTER VARYING, BOOL vs BOOLEAN). Tier-1 rendering can therefore
round-trip the parsed surface, while dialect-target rendering can normalize
to a target spelling.
Dialect-only type names live in the same closed enum (a type is one
canonical shape, not a per-dialect tree). Their recognition is gated
by TypeNameSyntax data, so a name like
TINYINT resolves to its built-in variant only under a dialect that opts in;
elsewhere the same word falls through to UserDefined.
The Other(X) seam (ADR-0009) lets an out-of-tree consumer carry a
host-owned type node produced by the parser crate’s Dialect::parse_data_type_hook
without spelling it as a stock variant or forcing it into
UserDefined. Stock builtins use X = NoExt (uninhabited), so
the arm is statically dead and DataType (= DataType<NoExt>) keeps its node size.
Variants§
Boolean
A boolean type (BOOLEAN/BOOL).
Fields
spelling: BooleanTypeNameExact source spelling retained for faithful rendering.
TinyInt
MySQL TINYINT (1-byte integer); recognized only under
TypeNameSyntax::extended_scalar_type_names.
Fields
display_width: Option<u32>Optional integer display width (M), e.g. TINYINT(1). This is display
metadata — it governs the left-pad width under ZEROFILL — never the
stored value’s precision or range (INT(1) still stores the full 32-bit
range). Canonically MySQL’s (INT(11)-style, deprecated in 8.0.17+ but
ubiquitous in dumps); SQLite accepts it through affinity type-name
absorption. Gated by
TypeNameSyntax::integer_display_width,
so ANSI/PostgreSQL reject the parenthesized form on a built-in integer.
SmallInt
A SMALLINT (2-byte integer).
Fields
MediumInt
MySQL MEDIUMINT (3-byte integer); recognized only under
TypeNameSyntax::extended_scalar_type_names.
Fields
Integer
An INT/INTEGER (4-byte integer).
Fields
spelling: IntegerTypeNameExact source spelling retained for faithful rendering.
BigInt
A BIGINT (8-byte integer).
Fields
Decimal
An exact DECIMAL/NUMERIC(p, s) type.
Fields
spelling: DecimalTypeNameExact source spelling retained for faithful rendering.
precision: Option<i32>The precision modifier. Signed because PostgreSQL parses the numeric/decimal
type-modifier arguments as a general expression list at raw-parse time, so a signed
modifier (numeric(-3, 6)) is accepted and validated only later — the sign is gated
for acceptance by
TypeNameSyntax::signed_type_modifier; off
elsewhere a leading - is a clean parse error.
Float
A FLOAT[(p)] approximate numeric type.
Fields
Real
A REAL (single-precision floating-point) type.
Double
A DOUBLE PRECISION (double-precision floating-point) type.
Fields
spelling: DoubleTypeNameExact source spelling retained for faithful rendering.
Text
A variable-length character LOB. The spelling tag carries the MySQL size
family (TINYTEXT/MEDIUMTEXT/LONGTEXT), which differ only in declared
maximum length; the bare PostgreSQL/MySQL TEXT is the default spelling.
Fields
spelling: TextTypeNameExact source spelling retained for faithful rendering.
charset: Option<Box<CharsetAnnotation>>MySQL’s character-set type annotation — the whole TEXT size family admits it in
column position (engine-measured on mysql:8.4: TEXT CHARACTER SET utf8mb4,
TINYTEXT ASCII, LONGTEXT BINARY, TEXT BYTE all prepare). See the field
docs on Character; None outside MySQL.
Blob
A binary LOB family: MySQL BLOB/TINYBLOB/MEDIUMBLOB/LONGBLOB. The
binary analog of Text; recognized only under
TypeNameSyntax::extended_scalar_type_names.
Fields
spelling: BlobTypeNameExact source spelling retained for faithful rendering.
Character
A fixed/variable-length character type (CHAR/VARCHAR/CHARACTER/…).
Fields
spelling: CharacterTypeNameExact source spelling retained for faithful rendering.
charset: Option<Box<CharsetAnnotation>>MySQL’s character-set type annotation — the grammar’s
opt_charset_with_opt_binary production: CHARACTER SET <name> (or the
CHARSET synonym), the ASCII/UNICODE/BYTE shortcuts, and/or the trailing
BINARY binary-collation modifier. Part of the type, not a column attribute:
it must directly follow the type (and its length) and is rejected once any
column attribute intervenes (CHAR(5) NOT NULL CHARACTER SET x is an
ER_PARSE_ERROR on mysql:8), which is why it lives on the type node — unlike
COLLATE, a free-floating column attribute. Recognized only under
TypeNameSyntax::character_set_annotation,
and only on the non-national spellings (CHAR/CHARACTER/VARCHAR): the
national forms (NCHAR/NATIONAL CHAR) fix their own charset and reject the
annotation, so they always carry None. None for every non-MySQL char type.
Boxed: the annotation is a rare, fat payload (MySQL-only, and only on annotated
char types), so ADR-0007 keeps it off the hot DataType node’s inline width —
the box is paid only on the rare annotated path.
Binary
A fixed/variable-length binary type (BINARY/VARBINARY).
Fields
spelling: BinaryTypeNameExact source spelling retained for faithful rendering.
Bit
A bit-string type: BIT [VARYING] [(n)] (PostgreSQL bit/varbit).
Fields
Json
The PostgreSQL JSON type (distinct from the jsonb user-defined name).
Uuid
The UUID type (PostgreSQL uuid, DuckDB UUID). A single-keyword scalar
carrying no parameters, shaped exactly like Json. Recognition is
ungated — the word resolves to this canonical variant wherever a type name is
admitted, so a type planner reads one UUID identity regardless of dialect rather
than a per-dialect UserDefined name. This is identity, not
acceptance: dialects that reject UUID in a given position still reject it there
(e.g. MySQL’s narrow CAST target set excludes UUID), the same way JSON is a
first-class variant yet remains subject to each dialect’s positional rules.
Date
A DATE type.
Time
A TIME [WITH|WITHOUT TIME ZONE] type.
Fields
spelling: TimeTypeNameExact source spelling retained for faithful rendering.
Timestamp
A TIMESTAMP [WITH|WITHOUT TIME ZONE] type.
Fields
spelling: TimestampTypeNameExact source spelling retained for faithful rendering.
Interval
An INTERVAL type, with an optional field qualifier and precision.
Fields
fields: Option<IntervalFields>Optional fields for this syntax.
Enum
ENUM('a', 'b', ...): a string type constrained to a value list — MySQL’s column
type and DuckDB’s x::ENUM('a', 'b') cast target. Structural (it carries the value
list), so it is one canonical variant rather than a spelling tag; recognized under
TypeNameSyntax::enum_type. The values are string
Literals whose spelling round-trips from their span.
Fields
charset: Option<Box<CharsetAnnotation>>MySQL’s character-set type annotation, which ENUM admits in column position
(engine-measured on mysql:8.4: ENUM('a') CHARACTER SET utf8mb4 / ASCII /
BYTE / BINARY all prepare). See the field docs on
Character; always None for DuckDB (whose grammar has no
such annotation) and outside MySQL.
Set
MySQL SET('a', 'b', ...): a string type whose value is a subset of the
listed members, recognized under
TypeNameSyntax::set_type. Shares
Enum’s value-list shape; the two stay distinct variants because the
membership semantics differ.
Fields
charset: Option<Box<CharsetAnnotation>>MySQL’s character-set type annotation — same surface as Enum
(engine-measured on mysql:8.4).
NumericModifier
A numeric type carrying MySQL’s SIGNED/UNSIGNED/ZEROFILL modifiers,
gated by TypeNameSyntax::numeric_modifiers.
One wrapper models the modifier for every numeric inner type, so the flag is
kept once rather than duplicated onto each numeric variant — the
same wrap-the-inner-type shape as Array. element is
optional because MySQL’s CAST(x AS UNSIGNED) / CAST(x AS SIGNED) use the
modifier as a standalone integer cast target that names no base type.
Fields
signedness: SignednessThe SIGNED/UNSIGNED modifier; see Signedness.
Array
An array type (T[], T[n], or T ARRAY[n]).
Fields
size: Option<u32>Fixed cardinality for the DuckDB fixed-size ARRAY (INTEGER[3] /
INTEGER ARRAY[3]), or None for the variable-length list (INTEGER[] /
INTEGER ARRAY). The two are distinct DuckDB types (ARRAY enforces the
count, LIST is unbounded); PostgreSQL accepts the bound syntactically but
ignores it (int[3] binds identically to int[]), so the value is retained
for round-trip regardless of dialect and its enforcement is a consumer concern.
spelling: ArrayTypeSpellingBracket T[]/T[n] vs keyword T ARRAY/T ARRAY[n] surface. One canonical
array-type shape covers both spellings; the tag round-trips the
written form.
Struct
An anonymous composite (record) type: DuckDB STRUCT(a INTEGER, b VARCHAR) or
the standard ROW(...) spelling of the same shape. One canonical named-field
list covers both spellings; spelling records the written keyword.
Recognized only under
TypeNameSyntax::composite_types; ANSI/
PostgreSQL reject the anonymous form (PostgreSQL has only named composite
types and spells ROW as a value constructor, never a type).
Fields
fields: ThinVec<StructTypeField<X>>fields in source order.
spelling: StructTypeSpellingExact source spelling retained for faithful rendering.
Union
An anonymous tagged-union type: DuckDB UNION(tag1 T1, tag2 T2, ...). Shares the
named-member shape of Struct but stays a distinct variant
because the semantics differ (a tagged sum type vs a product type), exactly as
Enum/Set share a value-list shape yet stay
distinct. Gated by the same composite_types flag.
Fields
members: ThinVec<StructTypeField<X>>members in source order.
Map
An anonymous map type: DuckDB MAP(K, V), where K and V are themselves
types (MAP(VARCHAR, STRUCT(x INTEGER)), MAP(INTEGER[], VARCHAR)). DuckDB
desugars a map to a LIST of STRUCT(key, value) in its serialized tree; the
canonical shape keeps the written key/value types directly (the desugaring is a
representation-equivalent difference the structural oracle normalizes, like the
list_value/struct_pack value desugars). Gated by composite_types.
Fields
Wrapped
A ClickHouse parametric type combinator wrapping exactly one inner type:
Nullable(T) (and the sibling LowCardinality(T), which shares this exact
single-inner-type shape). One canonical variant with a WrappedTypeKind axis
models the whole wrapper-shaped family — the same wrap-one-inner-type idiom as
NumericModifier, which keeps its modifier flag once
rather than duplicating a variant per numeric inner type — so a further
wrapper keyword is a new WrappedTypeKind arm plus a parser branch, never a
new DataType variant or Render arm.
inner is a full, recursively-nested type, so Nullable(DECIMAL(10, 2)) and
Nullable(String)[] both parse. ClickHouse constrains composability only at
bind time — it rejects Nullable(Nullable(T)) and Nullable(Array(T)) with a
type-resolution DB::Exception, not a grammar error — so those nestings
parse-accept here and the constraint is a binder concern, the same parse-vs-bind
split as ragged array literals.
Fields
kind: WrappedTypeKindWhich wrapper (Nullable/LowCardinality); see WrappedTypeKind.
FixedString
ClickHouse FixedString(N): a fixed-length byte string of exactly N bytes.
Deliberately its own variant rather than a WrappedTypeKind arm:
its argument is a scalar length N, not a nested inner type, so it does not share
the single-inner-type wrapper shape. It instead reuses the length-carrying string
idiom of Character/Binary, but with the
length as a non-optional u32 rather than Option<u32>: ClickHouse’s grammar
makes N mandatory (a bare FixedString with no parens is a different, invalid
spelling that falls through to the user-defined-type path), so the required argument
is encoded in the type itself instead of a runtime None those spelling-tagged
variants must tolerate. That mandatory-scalar shape is why it is not folded onto
Character under a spelling tag — and FixedString is a byte
string carrying no charset annotation, unlike the character variants.
N is a positive integer in ClickHouse; the grammar admits any u32 literal (0
included) and ClickHouse rejects FixedString(0) only at type resolution, the same
parse-vs-bind split as the Wrapped composability rejects. Recognized only under
TypeNameSyntax::fixed_string_type; the canonical
render emits ClickHouse’s mixed-case spelling (FixedString, never FIXEDSTRING).
Fields
DateTime64
ClickHouse DateTime64(P[, 'timezone']): a sub-second timestamp with P fractional
digits of precision and an optional IANA time-zone name.
Its own variant rather than a spelling tag on Timestamp, for two
shape reasons that mirror FixedString’s mandatory-scalar
argument. First, precision is mandatory: ClickHouse’s DateTime64 has no bare
spelling (the (P) is required; a bare DateTime64 with no parens is a different
spelling that falls through to the user-defined-type path), so precision is a
non-optional u32 rather than the Option<u32> that the ANSI/MySQL
Timestamp/Time variants carry. Second, its time
zone is a single-quoted string-literal argument, not the ANSI WITH TIME ZONE
flag those variants encode as a TimeZone tag — a different surface that would not
fit the tag. Those two differences are why it is not folded onto Timestamp.
timezone is the optional second argument, held as the source-spelled string
Literal so its exact quoting round-trips (the Enum value-member
idiom). P is parsed as any u32 literal; ClickHouse’s documented 0..=9 range is a
bind-time reject, not a grammar error — the same parse-vs-bind split as
FixedString’s positive-length rule. Recognized only under
TypeNameSyntax::datetime64_type; the canonical
render emits ClickHouse’s mixed-case spelling (DateTime64, never DATETIME64).
The timezone-only sibling DateTime('timezone') (no precision, on the plain
DateTime type) is a distinct surface and out of scope here — see the deferral on
the owning ticket.
Fields
Nested
ClickHouse Nested(name1 Type1, name2 Type2, ...): a named-field composite that
models a repeated group — semantically a set of parallel same-length arrays sharing
a common column prefix, not a single record value.
Shares the named-field StructTypeField shape of Struct/
Union but stays a distinct variant because the semantics differ (a
repeated nested structure vs a product or a tagged sum), exactly as
Union shares Struct’s field shape yet stays distinct and
Enum/Set share a value-list shape yet stay distinct.
A spelling tag on Struct would conflate those semantics and force the
composite_types gate; Nested instead carries its own
TypeNameSyntax::nested_type flag
(one behaviour = one flag) and its canonical render re-emits Nested, never STRUCT.
A field type is a full, recursively-nested type, so Nested(x Nested(y UInt8))
parses: ClickHouse permits arbitrary nesting levels (under flatten_nested=0), and
any level limit is a setting/bind concern, not a grammar error — the same parse-vs-bind
split as the Wrapped composability rejects. At least one field is
required (a bare Nested() is a syntax error), enforced by the one-or-more field list.
Fields
fields: ThinVec<StructTypeField<X>>fields in source order.
FixedWidthInt
ClickHouse’s fixed-bit-width integer type names: the signed Int8/Int16/Int32/
Int64/Int128/Int256 family and their unsigned UInt8…UInt256 siblings.
One canonical variant carries the signedness (signed)
and the width (IntWidth) as data, rather than a variant per width — the whole
bit-width family travels together in a dialect exactly as MySQL’s
TINYINT/MEDIUMINT/… ride one recognition gate, so it is one behaviour and one
DataType shape (the extended_scalar_type_names
precedent), gated by
TypeNameSyntax::bit_width_integer_names. Signedness
and width are the only axes, so the whole family is one DataType shape and one
Render arm rather than twelve.
Kept distinct from Integer/BigInt rather than
folded under a spelling tag: Int32/Int64 name the same underlying types as INT
and BIGINT but round-trip their own written surface, and the narrower/wider widths
(Int8/Int128/Int256) have no ANSI integer variant at all. The names take no
arguments, so a bare Int256 off-gate is an ordinary user-defined type name (the
trivial off-gate boundary, like a bare Nullable), never a parse error. The canonical
render emits ClickHouse’s mixed-case spelling (Int256/UInt256, never INT256).
Fields
UserDefined
A user-defined (or otherwise non-built-in) type reference — a dot-separated
qualified ObjectName with an optional parenthesized modifier list. Every type
name no typed variant claims lands here (the FALLBACK path), so a bare GEOMETRY,
citext, or schema.mytype is a UserDefined.
Fields
name: ObjectNameName referenced by this syntax.
modifiers: ThinVec<Literal>The parenthesized modifier arguments, as constant Literals whose spelling
round-trips from their span. An unsigned-integer modifier (FOO(3)) parses
under every dialect; a string-literal modifier (GEOMETRY('OGC:CRS84')) is
DuckDB’s, admitted only under
TypeNameSyntax::string_type_modifiers.
Empty when the name carries no parenthesized list.
Liberal
SQLite’s liberal affinity type name — a free run of one-or-more space-separated
words (UNSIGNED BIG INT, LONG INTEGER, NATIVE CHARACTER, and even the
misspelled INTEGEB PRIMARI KEY) with an optional one-or-two-argument parenthesized
modifier (VARCHAR(123,456), FLOATING POINT(5,10)). SQLite has no fixed type
vocabulary — a column/cast type is any ids ... token run terminated by a
column-constraint keyword, a comma, or a close paren — so a multi-word or two-argument
name that no typed variant can faithfully hold lands here instead of over-rejecting.
Recognized only under
TypeNameSyntax::liberal_type_names (SQLite +
Lenient).
§Why its own variant, not UserDefined
UserDefined carries an ObjectName — a dot-separated qualified name
(schema.type) that renders with . — and its modifiers are unsigned u32s. A
liberal affinity name is a space-separated word run with a distinct render, so it is
a genuinely different canonical shape (ADR-0011: one type = one shape), not a spelling
of the same UserDefined reference. Folding it in would force a render branch and a
separator tag onto the common single-word user-defined path and grow its hot node; a
dedicated variant keeps UserDefined untouched. A bare single-word affinity name
(BANANA) still parses to UserDefined — this variant is reached only when a second
word or a two-argument paren list makes the typed / user-defined parse insufficient
(the FALLBACK ordering: typed variants win wherever they can faithfully represent the
input, so INT, DOUBLE PRECISION, VARCHAR(255), NATIONAL CHARACTER(15) keep
their typed variants under SQLite).
§Boundary (engine-probed, rusqlite/sqlite3 3.53.2 & 3.43.2)
The word run terminates at a column-constraint keyword — PRIMARY, NOT, NULL,
UNIQUE, CHECK, DEFAULT, COLLATE, REFERENCES, CONSTRAINT, AS, GENERATED
(each engine-probed as a terminator, e.g. x MY PRIMARY rejects because PRIMARY
starts PRIMARY KEY, not the type) — or a comma / close paren; every other
identifier-or-non-reserved-keyword word is absorbed (x FOO BAR BAZ QUX accepts). A
reserved word (SELECT) can never be a type word (x SELECT rejects). The optional
paren list holds at most two arguments (FOO(1,2) accepts, FOO(1,2,3) rejects).
Fields
words: ThinVec<Ident>The one-or-more space-separated affinity words, each an Ident whose quote
style round-trips (a quoted "foo bar" word counts as one). Rendered
space-separated.
args: ThinVec<u32>The zero-, one-, or two-element parenthesized modifier list (VARCHAR(123,456)
carries [123, 456]). Empty when the name has no parens. Unsigned like
UserDefined::modifiers — SQLite’s grammar also admits a
signed or fractional argument, but the corpus surface is unsigned and the
signed/float forms are left to a follow-up (their absence under-accepts, never
over-accepts).
Other
A host-owned type node an out-of-tree dialect parses through the parser crate’s
Dialect::parse_data_type_hook (ADR-0009). The sixth Other(X) seam:
X = NoExt for every shipped builtin leaves this arm uninhabited and statically
dead, so stock parsing never produces it and DataType<NoExt> keeps its
byte-identical size.
Trait Implementations§
Source§impl<'de, X> Deserialize<'de> for DataType<X>where
X: Deserialize<'de> + Extension,
impl<'de, X> Deserialize<'de> for DataType<X>where
X: Deserialize<'de> + Extension,
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>,
impl<X: Eq + Extension> Eq for DataType<X>
impl<X: Extension + Render> FragmentRender for DataType<X>
Source§impl<X: Extension + Render> Render for DataType<X>
impl<X: Extension + Render> Render for DataType<X>
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreimpl<X: PartialEq + Extension> StructuralPartialEq for DataType<X>
Auto Trait Implementations§
impl<X> Freeze for DataType<X>where
X: Freeze,
impl<X> RefUnwindSafe for DataType<X>where
X: RefUnwindSafe,
impl<X> Send for DataType<X>where
X: Send,
impl<X> Sync for DataType<X>where
X: Sync,
impl<X> Unpin for DataType<X>where
X: Unpin,
impl<X> UnsafeUnpin for DataType<X>where
X: UnsafeUnpin,
impl<X> UnwindSafe for DataType<X>where
X: 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
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> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
PartialEq (whose &Self argument cannot go through a vtable). Equal
iff other holds the same concrete type and that type deems the values
equal; differently-typed nodes are never equal.