Trait tidb_query_datatype::codec::datum_codec::DatumFlagAndPayloadEncoder[][src]

pub trait DatumFlagAndPayloadEncoder: BufferWriter + DatumPayloadEncoder {
    fn write_datum_null(&mut self) -> Result<()> { ... }
fn write_datum_u64(&mut self, val: u64) -> Result<()> { ... }
fn write_datum_i64(&mut self, val: i64) -> Result<()> { ... }
fn write_datum_var_i64(&mut self, val: i64) -> Result<()> { ... }
fn write_datum_f64(&mut self, val: f64) -> Result<()> { ... }
fn write_datum_decimal(&mut self, val: &Decimal) -> Result<()> { ... }
fn write_datum_compact_bytes(&mut self, val: &[u8]) -> Result<()> { ... }
fn write_datum_duration_int(&mut self, val: Duration) -> Result<()> { ... }
fn write_datum_datetime_int(
        &mut self,
        val: DateTime,
        ctx: &mut EvalContext
    ) -> Result<()> { ... }
fn write_datum_json(&mut self, val: JsonRef<'_>) -> Result<()> { ... }
fn write_datum_enum_uint(&mut self, val: EnumRef<'_>) -> Result<()> { ... } }

An encoder to encode a datum, i.e. 1 byte flag + variable bytes payload.

The types this encoder accepts are not fully 1:1 mapping to evaluable types.

Provided methods

fn write_datum_null(&mut self) -> Result<()>[src]

fn write_datum_u64(&mut self, val: u64) -> Result<()>[src]

fn write_datum_i64(&mut self, val: i64) -> Result<()>[src]

fn write_datum_var_i64(&mut self, val: i64) -> Result<()>[src]

fn write_datum_f64(&mut self, val: f64) -> Result<()>[src]

fn write_datum_decimal(&mut self, val: &Decimal) -> Result<()>[src]

fn write_datum_compact_bytes(&mut self, val: &[u8]) -> Result<()>[src]

fn write_datum_duration_int(&mut self, val: Duration) -> Result<()>[src]

fn write_datum_datetime_int(
    &mut self,
    val: DateTime,
    ctx: &mut EvalContext
) -> Result<()>
[src]

fn write_datum_json(&mut self, val: JsonRef<'_>) -> Result<()>[src]

fn write_datum_enum_uint(&mut self, val: EnumRef<'_>) -> Result<()>[src]

Loading content...

Implementors

impl<T: BufferWriter> DatumFlagAndPayloadEncoder for T[src]

Loading content...