Trait sqlx_core::io::ProtocolEncode

source ·
pub trait ProtocolEncode<'en, Context = ()> {
    // Required method
    fn encode_with(
        &self,
        buf: &mut Vec<u8>,
        context: Context,
    ) -> Result<(), Error>;

    // Provided method
    fn encode(&self, buf: &mut Vec<u8>) -> Result<(), Error>
       where Self: ProtocolEncode<'en, ()> { ... }
}

Required Methods§

source

fn encode_with(&self, buf: &mut Vec<u8>, context: Context) -> Result<(), Error>

Provided Methods§

source

fn encode(&self, buf: &mut Vec<u8>) -> Result<(), Error>
where Self: ProtocolEncode<'en, ()>,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'en, C> ProtocolEncode<'en, C> for &[u8]

source§

fn encode_with(&self, buf: &mut Vec<u8>, _context: C) -> Result<(), Error>

Implementors§