impl tusk_rs::ToSql for __typ {
    fn to_sql(
        &self,
        _type: &tusk_rs::tokio_postgres::types::Type,
        buf: &mut tusk_rs::tokio_postgres::types::private::BytesMut,
    ) -> std::result::Result<
        tusk_rs::tokio_postgres::types::IsNull,
        std::boxed::Box<dyn std::error::Error + std::marker::Sync + std::marker::Send>,
    > {
        let s = match *self {
			__to_sql_cases,
			Self::Gone => panic!("__typ: Attempted to write same field twice!")
        };
        buf.extend_from_slice(s.as_bytes());
        std::result::Result::Ok(tusk_rs::tokio_postgres::types::IsNull::No)
    }
    fn accepts(type_: &tusk_rs::tokio_postgres::types::Type) -> bool {
        if type_.name() != "__typ_lower" {
            return false;
        }
        match *type_.kind() {
            tusk_rs::tokio_postgres::types::Kind::Enum(ref variants) => {
                if variants.len() != __countusize {
                    return false;
                }
                variants
                    .iter()
                    .all(|v| {
                        match &**v {
							__accepts_cases,
                            _ => false,
                        }
                    })
            }
            _ => false,
        }
    }
    fn to_sql_checked(
        &self,
        ty: &tusk_rs::tokio_postgres::types::Type,
        out: &mut tusk_rs::tokio_postgres::types::private::BytesMut,
    ) -> ::std::result::Result<
        tusk_rs::tokio_postgres::types::IsNull,
        Box<dyn ::std::error::Error + ::std::marker::Sync + ::std::marker::Send>,
    > {
        tusk_rs::tokio_postgres::types::__to_sql_checked(self, ty, out)
    }
}
impl<'a> tusk_rs::tokio_postgres::types::FromSql<'a> for __typ {
    fn from_sql(
        _type: &tusk_rs::tokio_postgres::types::Type,
        buf: &'a [u8],
    ) -> std::result::Result<
        Self,
        std::boxed::Box<dyn std::error::Error + std::marker::Sync + std::marker::Send>,
    > {
        match std::str::from_utf8(buf)? {
			__from_sql_cases,
            s => {
                std::result::Result::Err(
					format!("invalid variant `{0}`", s).into(),
                )
            }
		}
    }
    fn accepts(type_: &tusk_rs::tokio_postgres::types::Type) -> bool {
        if type_.name() != "__typ_lower" {
            return false;
        }
        match *type_.kind() {
            ::tusk_rs::tokio_postgres::types::Kind::Enum(ref variants) => {
                if variants.len() != __countusize {
                    return false;
                }
                variants
                    .iter()
                    .all(|v| {
                        match &**v {
							__accepts_cases,
                            _ => false,
                        }
                    })
            }
            _ => false,
        }
    }
}
