pub struct DecoderConfig {
pub encoding_type: EncodingType,
pub target_property: String,
pub output_property: Option<String>,
pub strip_quotes: bool,
pub on_error: ErrorHandling,
pub max_size_bytes: usize,
}Expand description
Configuration for the Decoder middleware.
Fields§
§encoding_type: EncodingTypeThe encoding type to decode from.
target_property: StringThe property containing the encoded string.
output_property: Option<String>Optional property name to store the decoded string.
If None, target_property is overwritten.
strip_quotes: boolIf true, surrounding double quotes (") are removed from the target string before decoding.
on_error: ErrorHandlingHow to handle errors during decoding or if the target property is missing/invalid.
max_size_bytes: usizeMaximum allowed size for encoded strings to prevent excessive memory usage.
Trait Implementations§
Source§impl Clone for DecoderConfig
impl Clone for DecoderConfig
Source§fn clone(&self) -> DecoderConfig
fn clone(&self) -> DecoderConfig
Returns a duplicate 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 Debug for DecoderConfig
impl Debug for DecoderConfig
Source§impl<'de> Deserialize<'de> for DecoderConfig
impl<'de> Deserialize<'de> for DecoderConfig
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
Auto Trait Implementations§
impl Freeze for DecoderConfig
impl RefUnwindSafe for DecoderConfig
impl Send for DecoderConfig
impl Sync for DecoderConfig
impl Unpin for DecoderConfig
impl UnsafeUnpin for DecoderConfig
impl UnwindSafe for DecoderConfig
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