pub struct DecodeOptions {
pub strictness: Strictness,
pub profile: WireProfile,
pub max_bytes: usize,
}Expand description
Everything that shapes a decode.
Fields§
§strictness: StrictnessStrict or lenient.
profile: WireProfileThe wire profile to decode against.
max_bytes: usizeThe largest message that will be parsed at all.
Implementations§
Source§impl DecodeOptions
impl DecodeOptions
Sourcepub const DEFAULT_MAX_BYTES: usize
pub const DEFAULT_MAX_BYTES: usize
One mebibyte. Large enough for any plausible S2 message, small enough that a peer cannot exhaust memory with a single legal one.
Sourcepub const fn profile(self, profile: WireProfile) -> Self
pub const fn profile(self, profile: WireProfile) -> Self
Decode against a particular wire profile.
Trait Implementations§
Source§impl Clone for DecodeOptions
impl Clone for DecodeOptions
Source§impl Debug for DecodeOptions
impl Debug for DecodeOptions
Source§impl Default for DecodeOptions
impl Default for DecodeOptions
Source§impl PartialEq for DecodeOptions
impl PartialEq for DecodeOptions
impl StructuralPartialEq for DecodeOptions
Auto Trait Implementations§
impl Forget for DecodeOptions
impl Freeze for DecodeOptions
impl Move for DecodeOptions
impl RefUnwindSafe for DecodeOptions
impl Send for DecodeOptions
impl Sync for DecodeOptions
impl Unpin for DecodeOptions
impl UnsafeUnpin for DecodeOptions
impl UnwindSafe for DecodeOptions
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