Pg

Trait Pg 

Source
pub trait Pg {
    // Required method
    fn ty() -> String;
}
Expand description

Any type that can be stored in a database should implement this trait.

Required Methods§

Source

fn ty() -> String

Returns the potgres type corresponding to the type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Pg for bool

Source§

impl Pg for f32

Source§

impl Pg for f64

Source§

impl Pg for i32

Source§

impl Pg for i64

Source§

impl Pg for String

Source§

impl<T: Pg + Send> Pg for Option<T>

Implementors§

Source§

impl<T: ToTable> Pg for ManyToOne<T>

Source§

impl<T: ToTable> Pg for OneToOne<T>