Trait xitca_postgres::dev::Encode

source ·
pub trait Encode: Sealed + Sized {
    // Required method
    fn encode<I, const SYNC_MODE: bool>(
        self,
        params: I,
        buf: &mut BytesMut,
    ) -> Result<(), Error>
       where I: AsParams;
}
Expand description

trait for generic over how to encode a query. this trait can not be implement by library user.

Required Methods§

source

fn encode<I, const SYNC_MODE: bool>( self, params: I, buf: &mut BytesMut, ) -> Result<(), Error>
where I: AsParams,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Encode for &str

source§

fn encode<I, const SYNC_MODE: bool>( self, _: I, buf: &mut BytesMut, ) -> Result<(), Error>
where I: AsParams,

source§

impl Encode for &String

source§

fn encode<I, const SYNC_MODE: bool>( self, params: I, buf: &mut BytesMut, ) -> Result<(), Error>
where I: AsParams,

source§

impl Encode for &Arc<Statement>

source§

fn encode<I, const SYNC_MODE: bool>( self, params: I, buf: &mut BytesMut, ) -> Result<(), Error>
where I: AsParams,

Implementors§

source§

impl Encode for &Statement

source§

impl<C> Encode for &StatementGuarded<'_, C>
where C: Prepare,

source§

impl<C> Encode for StatementUnnamed<'_, C>
where C: Prepare,