#[non_exhaustive]pub struct DecodeRules {
pub min_base64_run: u32,
pub min_hex_run: u32,
pub max_passes: u32,
}Expand description
TOML-configurable decode thresholds and recursion limits.
This struct is #[non_exhaustive] to allow adding new configuration fields
(like per-format recursion caps) without breaking downstream consumers.
§Examples
use vyre_wgpu::engine::decode::DecodeRules;
let rules = DecodeRules::from_toml("min_base64_run = 12\nmin_hex_run = 16\nmax_passes = 4")?;
assert_eq!(rules.min_base64_run, 12);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.min_base64_run: u32Minimum contiguous base64 run length to attempt decoding.
min_hex_run: u32Minimum contiguous hex run length to attempt decoding.
max_passes: u32Maximum recursive decode passes.
Implementations§
Source§impl DecodeRules
impl DecodeRules
Trait Implementations§
Source§impl Clone for DecodeRules
impl Clone for DecodeRules
Source§fn clone(&self) -> DecodeRules
fn clone(&self) -> DecodeRules
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 DecodeRules
impl Debug for DecodeRules
Source§impl Default for DecodeRules
impl Default for DecodeRules
Source§impl<'de> Deserialize<'de> for DecodeRules
impl<'de> Deserialize<'de> for DecodeRules
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 PartialEq for DecodeRules
impl PartialEq for DecodeRules
impl Eq for DecodeRules
impl StructuralPartialEq for DecodeRules
Auto Trait Implementations§
impl Freeze for DecodeRules
impl RefUnwindSafe for DecodeRules
impl Send for DecodeRules
impl Sync for DecodeRules
impl Unpin for DecodeRules
impl UnsafeUnpin for DecodeRules
impl UnwindSafe for DecodeRules
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.