pub struct DecodeContext {
pub limits: DecodeLimits,
pub alloc_used: usize,
pub current_depth: u16,
}Fields§
§limits: DecodeLimits§alloc_used: usize§current_depth: u16Implementations§
Source§impl DecodeContext
impl DecodeContext
pub fn new(limits: DecodeLimits) -> Self
pub fn check_alloc(&mut self, n: usize) -> Result<(), DecodeError>
pub fn depth_enter(&mut self) -> Result<(), DecodeError>
pub fn depth_exit(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecodeContext
impl RefUnwindSafe for DecodeContext
impl Send for DecodeContext
impl Sync for DecodeContext
impl Unpin for DecodeContext
impl UnsafeUnpin for DecodeContext
impl UnwindSafe for DecodeContext
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