pub struct GuardPool(_);
Expand description

A GuardPool is an “arena”-style storage area for FlatGuards.

Some invariants for the underlying vector:

  • GuardRefs are always within the same pool (obviously).
  • The underlyings numbers in GuardRefs can only go “backward,” in the sense that they refer to smaller indices than the current FlatGuard.
  • The first FlatGuard is always FlatGuard::True.

This could be used to do some interesting hash-consing/deduplication; it currently does the weakest possible form of that: deduplicating True guards only.

Implementations

Iterate over all the guards in the pool.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.