Struct NullBitmap

Source
pub struct NullBitmap<T, U: AsRef<[u8]> = Vec<u8>>(/* private fields */);
Expand description

Implementations§

Source§

impl<T: SerializationSide> NullBitmap<T, Vec<u8>>

Source

pub fn new(num_columns: usize) -> Self

Creates new null-bitmap for a given number of columns.

Source

pub fn read(input: &mut &[u8], num_columns: usize) -> Self

Will read null-bitmap for a given number of columns from input.

Source§

impl<T: SerializationSide, U: AsRef<[u8]>> NullBitmap<T, U>

Source

pub fn bitmap_len(num_columns: usize) -> usize

Source

pub fn from_bytes(bytes: U) -> Self

Creates new null-bitmap from given bytes.

Source

pub fn is_null(&self, column_index: usize) -> bool

Returns true if given column is NULL in this NullBitmap.

Source§

impl<T: SerializationSide, U: AsRef<[u8]> + AsMut<[u8]>> NullBitmap<T, U>

Source

pub fn set(&mut self, column_index: usize, is_null: bool)

Sets flag value for given column.

Trait Implementations§

Source§

impl<T, U: AsRef<[u8]>> AsRef<[u8]> for NullBitmap<T, U>

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Clone, U: Clone + AsRef<[u8]>> Clone for NullBitmap<T, U>

Source§

fn clone(&self) -> NullBitmap<T, U>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, U: Debug + AsRef<[u8]>> Debug for NullBitmap<T, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, T: SerializationSide> MyDeserialize<'de> for NullBitmap<T, Cow<'de, [u8]>>

Source§

const SIZE: Option<usize> = None

Size hint of a serialized value (in bytes), if it’s constant.
Source§

type Ctx = usize

Some structs defines deserialization in the context of another value. Read more
Source§

fn deserialize(num_columns: Self::Ctx, buf: &mut ParseBuf<'de>) -> Result<Self>

Deserializes self from the given buf. Read more
Source§

impl<T: PartialEq, U: PartialEq + AsRef<[u8]>> PartialEq for NullBitmap<T, U>

Source§

fn eq(&self, other: &NullBitmap<T, U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Eq, U: Eq + AsRef<[u8]>> Eq for NullBitmap<T, U>

Source§

impl<T, U: AsRef<[u8]>> StructuralPartialEq for NullBitmap<T, U>

Auto Trait Implementations§

§

impl<T, U> Freeze for NullBitmap<T, U>
where U: Freeze,

§

impl<T, U> RefUnwindSafe for NullBitmap<T, U>

§

impl<T, U> Send for NullBitmap<T, U>
where U: Send, T: Send,

§

impl<T, U> Sync for NullBitmap<T, U>
where U: Sync, T: Sync,

§

impl<T, U> Unpin for NullBitmap<T, U>
where U: Unpin, T: Unpin,

§

impl<T, U> UnwindSafe for NullBitmap<T, U>
where U: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.