pub fn bind<'a, I, E>(
    client: &Client,
    statement: &Statement,
    name: &str,
    params_formats: &[i16],
    params: I,
    result_formats: &[i16],
) -> Result<Portal, E>
where
    I: IntoIterator<Item = &'a Option<BytesMut>>,
    I::IntoIter: ExactSizeIterator,
    E: std::convert::From<crate::error::Error>,
{
    let inner = client.inner();
    inner.raw_buf(|buf| {
        encode_bind(statement, params_formats, params, name, result_formats, buf)?;
        Ok(())
    })?;

    Ok(Portal::new(inner, name))
}
/// Binds some parameters to a prepared statement, thus creating a portal
/// Portals could be then executed or dropped when no more needed.
Binds some parameters to a prepared statement, thus creating a portal
Portals could be then executed or dropped when no more needed.
Binds some parameters to a prepared statement thus creating a portal Portals could be then executed or dropped when no more needed .
pub fn bind<'a, I, E>(
    client: &Client,
    statement: &Statement,
    name: &str,
    params_formats: &[i16],
    params: I,
    result_formats: &[i16],
) -> Result<Portal, E>
where
    I: IntoIterator<Item = &'a Option<BytesMut>>,
    I::IntoIter: ExactSizeIterator,
    E: std::convert::From<crate::error::Error>,
{
    let inner = client.inner();
    inner.raw_buf(|buf| {
        encode_bind(statement, params_formats, params, name, result_formats, buf)?;
        Ok(())
    })?;
    Ok(Portal::new(inner, name))
}
pub fn bind < ' a , I , E > ( client : & Client , statement : & Statement , name : & str , params_formats : & [ i16 ] , params : I , result_formats : & [ i16 ] , ) -> Result < Portal , E > where I : IntoIterator < Item = & ' a Option < BytesMut > > , I :: IntoIter : ExactSizeIterator , E : std :: convert :: From < crate :: error :: Error > , { let inner = client . inner ( ) ; inner . raw_buf ( | buf | { encode_bind ( statement , params_formats , params , name , result_formats , buf ) ? ; Ok ( ( ) ) } ) ? ; Ok ( Portal :: new ( inner , name ) ) }
Binds some parameters to a prepared statement, thus creating a portal
Portals could be then executed or dropped when no more needed.
Binds some parameters to a prepared statement thus creating a portal Portals could be then executed or dropped when no more needed .
client
&Client
statement
&Statement
name
&str
params_formats
&[i16]
params
I
result_formats
&[i16]
client
&Client
statement
&Statement
name
&str
params_formats
&[i16]
params
I
result_formats
&[i16]