Struct bonsaidb::core::key::AllowNullBytes
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§
§impl Clone for AllowNullBytes
impl Clone for AllowNullBytes
§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 more§impl CompositeKeyNullHandler for AllowNullBytes
impl CompositeKeyNullHandler for AllowNullBytes
§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.§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.§impl Debug for AllowNullBytes
impl Debug for AllowNullBytes
§impl Default for AllowNullBytes
impl Default for AllowNullBytes
§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