postgres::accepts! [] [src]

macro_rules! accepts {
    ($($expected:pat),+) => (
        fn accepts(ty: &$crate::types::Type) -> bool {
            match *ty {
                $($expected)|+ => true,
                _ => false
            }
        }
    )
}

Generates a simple implementation of ToSql::accepts which accepts the types passed to it.