[−][src]Struct cborian::decoder::Config
Config
contains various settings which limit resource consumption
or enable certain validation options. Please note that the various
maximum length/size values apply to an individual element only.
This is mainly to prevent attackers from providing CBOR values whose
length is larger than the available memory. In combination the memory
consumption can still become large and it is best to limit the incoming
bytes to a specific upper bound, e.g. by using std::io::Take
.
Fields
max_len_array: usize
Maximum number of array elements
max_len_bytes: usize
Maximum length of a byte string
max_len_text: usize
Maximum length of a string
max_size_map: usize
Maximum number of object fields
max_nesting: usize
Maximum recursion steps when decoder Value
s
Ignore Tag
s when decoding Value
s
Validate Value
type matches Tag
.
Implementations
impl Config
[src]
pub fn default() -> Config
[src]
Create default configuration with
max_len_array
= 1000max_len_bytes
= 5 MBmax_len_text
= 5 MBmax_size_map
= 1000max_nesting
= 16skip_tags
= falsecheck_tags
= true
Trait Implementations
impl Clone for Config
[src]
impl Debug for Config
[src]
impl Eq for Config
[src]
impl PartialEq<Config> for Config
[src]
impl StructuralEq for Config
[src]
impl StructuralPartialEq for Config
[src]
Auto Trait Implementations
impl RefUnwindSafe for Config
[src]
impl Send for Config
[src]
impl Sync for Config
[src]
impl Unpin for Config
[src]
impl UnwindSafe for Config
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,