pub struct DepthGauge { /* private fields */ }Expand description
Depth gauge is used on potentially recursive structures like Variant & ExtensionObject during decoding to limit the depth the decoder will go before giving up.
Implementations§
Source§impl DepthGauge
impl DepthGauge
Sourcepub fn new(max_depth: u64) -> DepthGauge
pub fn new(max_depth: u64) -> DepthGauge
Create a new depth gauge with specified max depth.
Sourcepub fn minimal() -> DepthGauge
pub fn minimal() -> DepthGauge
Create a minimal depth gauge with max depth of 1.
Trait Implementations§
Source§impl Clone for DepthGauge
impl Clone for DepthGauge
Source§fn clone(&self) -> DepthGauge
fn clone(&self) -> DepthGauge
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 DepthGauge
impl Debug for DepthGauge
Source§impl Default for DepthGauge
impl Default for DepthGauge
Source§fn default() -> DepthGauge
fn default() -> DepthGauge
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DepthGauge
impl RefUnwindSafe for DepthGauge
impl Send for DepthGauge
impl Sync for DepthGauge
impl Unpin for DepthGauge
impl UnsafeUnpin for DepthGauge
impl UnwindSafe for DepthGauge
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