Skip to main content

Build

Trait Build 

Source
pub trait Build {
    // Required method
    fn to_statement(&self) -> Statement;

    // Provided methods
    fn build(&self) -> (String, Vec<Value>) { ... }
    fn to_string_inlined(&self) -> String { ... }
}
Expand description

Anything that renders to a Statement.

Required Methods§

Source

fn to_statement(&self) -> Statement

Renders into a Statement.

Provided Methods§

Source

fn build(&self) -> (String, Vec<Value>)

Renders to the SQL text and the values to bind.

Source

fn to_string_inlined(&self) -> String

Renders with literals inlined, for logs and tests only.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§