pub struct DataRowEncoder { /* private fields */ }Implementations§
Source§impl DataRowEncoder
impl DataRowEncoder
Sourcepub fn new(fields: Arc<Vec<FieldInfo>>) -> DataRowEncoder
pub fn new(fields: Arc<Vec<FieldInfo>>) -> DataRowEncoder
New DataRowEncoder from schema of column
Sourcepub fn encode_field_with_type_and_format<T>(
&mut self,
value: &T,
data_type: &Type,
format: FieldFormat,
) -> PgWireResult<()>
pub fn encode_field_with_type_and_format<T>( &mut self, value: &T, data_type: &Type, format: FieldFormat, ) -> PgWireResult<()>
Encode value with custom type and format
This encode function ignores data type and format information from schema of this encoder.
Sourcepub fn encode_field<T>(&mut self, value: &T) -> PgWireResult<()>
pub fn encode_field<T>(&mut self, value: &T) -> PgWireResult<()>
Encode value using type and format, defined by schema
Panic when encoding more columns than provided as schema.
pub fn finish(self) -> PgWireResult<DataRow>
Auto Trait Implementations§
impl Freeze for DataRowEncoder
impl RefUnwindSafe for DataRowEncoder
impl Send for DataRowEncoder
impl Sync for DataRowEncoder
impl Unpin for DataRowEncoder
impl UnwindSafe for DataRowEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more