pub struct NullMask {}Implementations§
Source§impl NullMask
impl NullMask
Sourcepub fn serialize(input: &SqlTuple) -> Bytes
pub fn serialize(input: &SqlTuple) -> Bytes
Writes out a bit vector that sets a bit for every null value.
§Examples
let test = SqlTuple(vec![Some(BaseSqlTypes::Bool(true)),
Some(BaseSqlTypes::Bool(true)),
Some(BaseSqlTypes::Bool(true)),
]);
let mask = NullMask::serialize(&test);
assert_eq!(hex!("00").to_vec(), mask);pub fn parse( buffer: &mut impl Buf, column_count: usize, ) -> Result<Vec<bool>, NullMaskError>
Trait Implementations§
Source§impl EncodedSize<&SqlTuple> for NullMask
impl EncodedSize<&SqlTuple> for NullMask
fn encoded_size(input: &SqlTuple) -> usize
Auto Trait Implementations§
impl Freeze for NullMask
impl RefUnwindSafe for NullMask
impl Send for NullMask
impl Sync for NullMask
impl Unpin for NullMask
impl UnwindSafe for NullMask
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