Struct bonsaidb::core::key::AllowNullBytes
source · pub struct AllowNullBytes;
Expand description
Prevents checking for null bytes in variable length fields in composite
keys. Key
types that have a fixed width have no edge cases with null
bytes. See CompositeKeyFieldContainsNullByte
for an explanation and
example of the edge case introduced when allowing null bytes to be used
without escaping.
Trait Implementations§
source§impl Clone for AllowNullBytes
impl Clone for AllowNullBytes
source§fn clone(&self) -> AllowNullBytes
fn clone(&self) -> AllowNullBytes
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CompositeKeyNullHandler for AllowNullBytes
impl CompositeKeyNullHandler for AllowNullBytes
source§fn handle_nulls(
&self,
_encoded: &mut Cow<'_, [u8]>
) -> Result<(), CompositeKeyError>
fn handle_nulls( &self, _encoded: &mut Cow<'_, [u8]> ) -> Result<(), CompositeKeyError>
Process the null bytes in
field_bytes
, if needed.source§fn decode_nulls_if_needed<'b, 'e>(
&self,
encoded: ByteSource<'b, 'e>
) -> Result<ByteSource<'b, 'e>, CompositeKeyError>
fn decode_nulls_if_needed<'b, 'e>( &self, encoded: ByteSource<'b, 'e> ) -> Result<ByteSource<'b, 'e>, CompositeKeyError>
Decode the null bytes in
encoded
, if needed.source§impl Debug for AllowNullBytes
impl Debug for AllowNullBytes
source§impl Default for AllowNullBytes
impl Default for AllowNullBytes
source§fn default() -> AllowNullBytes
fn default() -> AllowNullBytes
Returns the “default value” for a type. Read more
impl Copy for AllowNullBytes
Auto Trait Implementations§
impl RefUnwindSafe for AllowNullBytes
impl Send for AllowNullBytes
impl Sync for AllowNullBytes
impl Unpin for AllowNullBytes
impl UnwindSafe for AllowNullBytes
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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