struct Measured {
state: AtomicU32,
leaf: AtomicUsize,
}Expand description
What measuring a composite’s tree found, kept in atomics so an outline stays cheap to clone and safe to share.
Two threads that measure at once store the same values.
Fields§
§state: AtomicU32Measured::UNMEASURED until the tree is measured. Then one of the
other states in the low two bits, with the nesting depth above them.
leaf: AtomicUsizeThe size in bytes of the largest leaf, once state says so.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Measured
impl RefUnwindSafe for Measured
impl Send for Measured
impl Sync for Measured
impl Unpin for Measured
impl UnsafeUnpin for Measured
impl UnwindSafe for Measured
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