pub struct AtomicSecurityCounters { /* private fields */ }Expand description
Thread-safe security counters using atomic operations.
Tracks node counts and key counts across parallel parsing threads without lock contention.
Implementations§
Source§impl AtomicSecurityCounters
impl AtomicSecurityCounters
Sourcepub fn increment_nodes(
&self,
limits: &Limits,
line_num: usize,
) -> HedlResult<()>
pub fn increment_nodes( &self, limits: &Limits, line_num: usize, ) -> HedlResult<()>
Increment node count with security check.
Returns error if limit is exceeded.
Sourcepub fn increment_keys(&self, limits: &Limits, line_num: usize) -> HedlResult<()>
pub fn increment_keys(&self, limits: &Limits, line_num: usize) -> HedlResult<()>
Increment total keys count with security check.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Get current node count.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AtomicSecurityCounters
impl RefUnwindSafe for AtomicSecurityCounters
impl Send for AtomicSecurityCounters
impl Sync for AtomicSecurityCounters
impl Unpin for AtomicSecurityCounters
impl UnwindSafe for AtomicSecurityCounters
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more