pub struct Config {
pub zeroed_scalar_values: bool,
}Expand description
Configuration parameters for encoding and decoding
Fields§
§zeroed_scalar_values: boolFlag to zero skip scalar values during encoding, and zero them during decoding
Implementations§
Trait Implementations§
Source§impl BaseConfig for Config
impl BaseConfig for Config
Source§impl DecodableElement for Config
impl DecodableElement for Config
Source§fn try_from_buffer_in_place<'a, 'b>(
&'a mut self,
ctx: &DecoderContext<'a>,
buf: &'b [u8],
) -> Result<()>
fn try_from_buffer_in_place<'a, 'b>( &'a mut self, ctx: &DecoderContext<'a>, buf: &'b [u8], ) -> Result<()>
Deserialize the type from a given buffer Read more
Source§fn try_from_buffer<'b>(ctx: &DecoderContext<'_>, buf: &'b [u8]) -> Result<Self>
fn try_from_buffer<'b>(ctx: &DecoderContext<'_>, buf: &'b [u8]) -> Result<Self>
Create a new instance of the type from the provided buffer
Source§fn try_decode_in_place<'a, 'b>(
&mut self,
ctx: &DecoderContext<'a>,
buf: &'b [u8],
) -> Result<&'b [u8]>
fn try_decode_in_place<'a, 'b>( &mut self, ctx: &DecoderContext<'a>, buf: &'b [u8], ) -> Result<&'b [u8]>
Write an element from the buffer, and return the remainder bytes Read more
Source§fn try_decode<'a, 'b>(
ctx: &DecoderContext<'a>,
buf: &'b [u8],
) -> Result<(Self, &'b [u8])>
fn try_decode<'a, 'b>( ctx: &DecoderContext<'a>, buf: &'b [u8], ) -> Result<(Self, &'b [u8])>
Write an element from the buffer, and return the remainder bytes Read more
Source§fn try_from_reader<R>(ctx: &DecoderContext<'_>, reader: R) -> Result<Self>where
R: Read,
fn try_from_reader<R>(ctx: &DecoderContext<'_>, reader: R) -> Result<Self>where
R: Read,
Fetch a new element from a context
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Element for Config
impl Element for Config
Source§impl EncodableElement for Config
impl EncodableElement for Config
Source§fn to_buffer(&self, ctx: &mut EncoderContext, buf: &mut [u8])
fn to_buffer(&self, ctx: &mut EncoderContext, buf: &mut [u8])
Write the type into the buffer. Read more
Source§fn to_vec(&self, ctx: &mut EncoderContext) -> Vec<u8> ⓘ
fn to_vec(&self, ctx: &mut EncoderContext) -> Vec<u8> ⓘ
Serialize the object into a bytes array.
impl Copy for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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