sqlx-core 0.3.5

Core of SQLx, the rust SQL toolkit. Not intended to be used directly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use byteorder::LittleEndian;

use crate::mysql::io::BufExt;

#[derive(Debug)]
pub struct ColumnCount {
    pub columns: u64,
}

impl ColumnCount {
    pub(crate) fn read(mut buf: &[u8]) -> crate::Result<Self> {
        let columns = buf.get_uint_lenenc::<LittleEndian>()?.unwrap_or(0);

        Ok(Self { columns })
    }
}