pub trait AstDisplay {
// Required method
fn fmt<W>(&self, f: &mut AstFormatter<W>)
where W: Write;
// Provided methods
fn to_ast_string_simple(&self) -> String { ... }
fn to_ast_string_stable(&self) -> String { ... }
fn to_ast_string_redacted(&self) -> String { ... }
fn to_ast_string(&self, format_mode: FormatMode) -> String { ... }
}Required Methods§
fn fmt<W>(&self, f: &mut AstFormatter<W>)where
W: Write,
Provided Methods§
fn to_ast_string_simple(&self) -> String
fn to_ast_string_stable(&self) -> String
fn to_ast_string_redacted(&self) -> String
fn to_ast_string(&self, format_mode: FormatMode) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl AstDisplay for i64
impl AstDisplay for i64
fn fmt<W>(&self, f: &mut AstFormatter<W>)where
W: Write,
Source§impl AstDisplay for u32
impl AstDisplay for u32
fn fmt<W>(&self, f: &mut AstFormatter<W>)where
W: Write,
Source§impl AstDisplay for u64
impl AstDisplay for u64
fn fmt<W>(&self, f: &mut AstFormatter<W>)where
W: Write,
Source§impl<T> AstDisplay for &Box<T>where
T: AstDisplay,
impl<T> AstDisplay for &Box<T>where
T: AstDisplay,
fn fmt<W>(&self, f: &mut AstFormatter<W>)where
W: Write,
Source§impl<T> AstDisplay for Box<T>where
T: AstDisplay,
impl<T> AstDisplay for Box<T>where
T: AstDisplay,
fn fmt<W>(&self, f: &mut AstFormatter<W>)where
W: Write,
Implementors§
impl AstDisplay for &UnresolvedItemName
impl AstDisplay for AlterConnectionOptionName
impl AstDisplay for AlterMaterializedViewApplyReplacementStatement
impl AstDisplay for AlterObjectRenameStatement
impl AstDisplay for AlterObjectSwapStatement
impl AstDisplay for AlterRoleOption
impl AstDisplay for AlterSourceAddSubsourceOptionName
impl AstDisplay for AlterSystemResetAllStatement
impl AstDisplay for AlterSystemResetStatement
impl AstDisplay for AlterSystemSetStatement
impl AstDisplay for AvroSchemaOptionName
impl AstDisplay for CloseStatement
impl AstDisplay for ClusterAlterOptionName
impl AstDisplay for ClusterAlterUntilReadyOptionName
impl AstDisplay for ClusterFeatureName
impl AstDisplay for ClusterOptionName
impl AstDisplay for ClusterScheduleOptionValue
impl AstDisplay for ColumnVersioned
impl AstDisplay for CommitStatement
impl AstDisplay for ConnectionOptionName
impl AstDisplay for ConnectionRulePattern
impl AstDisplay for CopyDirection
impl AstDisplay for CopyOptionName
impl AstDisplay for CreateConnectionOptionName
impl AstDisplay for CreateConnectionType
impl AstDisplay for CreateDatabaseStatement
impl AstDisplay for CreateRoleStatement
impl AstDisplay for CreateSchemaStatement
impl AstDisplay for CreateSinkOptionName
impl AstDisplay for CreateSourceOptionName
impl AstDisplay for CreateSubsourceOptionName
impl AstDisplay for CreateTypeListOptionName
impl AstDisplay for CreateTypeMapOptionName
impl AstDisplay for CreateWebhookSourceBody
impl AstDisplay for CreateWebhookSourceFilterHeader
impl AstDisplay for CreateWebhookSourceHeader
impl AstDisplay for CreateWebhookSourceIncludeHeaders
impl AstDisplay for CreateWebhookSourceMapHeader
impl AstDisplay for CsrSeedAvro
impl AstDisplay for CsrSeedProtobuf
impl AstDisplay for CsrSeedProtobufSchema
impl AstDisplay for CsvColumns
impl AstDisplay for DeallocateStatement
impl AstDisplay for DiscardStatement
impl AstDisplay for DiscardTarget
impl AstDisplay for DropObjectsStatement
impl AstDisplay for ExplainAnalyzeClusterStatement
impl AstDisplay for ExplainFormat
impl AstDisplay for ExplainPlanOptionName
impl AstDisplay for ExplainStage
impl AstDisplay for ExternalReferenceExport
impl AstDisplay for ExternalReferences
impl AstDisplay for FetchDirection
impl AstDisplay for FetchOptionName
impl AstDisplay for HomogenizingFunction
impl AstDisplay for IcebergSinkConfigOptionName
impl AstDisplay for IcebergSinkMode
impl AstDisplay for Ident
More-or-less a direct translation of the Postgres function for doing the same thing:
https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/ruleutils.c#L10730-L10812
Quotation is forced when printing in Stable mode.