Skip to main content

TranspileTarget

Trait TranspileTarget 

Source
pub trait TranspileTarget {
    // Required method
    fn with_dialect<R>(self, f: impl FnOnce(&Dialect) -> R) -> R;
}
Expand description

A value that can be used as the target dialect in Dialect::transpile / Dialect::transpile_with.

Implemented for DialectType (built-in dialect enum) and &Dialect (any dialect handle, including custom ones). End users do not normally need to implement this trait themselves.

Required Methods§

Source

fn with_dialect<R>(self, f: impl FnOnce(&Dialect) -> R) -> R

Invoke f with a reference to the resolved target dialect.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl TranspileTarget for &Dialect

Available on crate feature transpile only.
Source§

impl TranspileTarget for DialectType

Available on crate feature transpile only.