pub struct LoopCell<T>(/* private fields */);Expand description
Specialized cell for building iterators that handle a value (such as a shared buffer), make it
available for processing, modification, etc., and then it needs to be available for the next
iteration. Access is performed by LoopCell::access.
Because Cell is not Sync, the LoopCellAccess for LoopCells are not Send.
This is particularly important when writing core::future::Futures and asynchronous code,
which is often a place where you’d want this (e.g. handling streams of events). In that case,
you want LoopSyncCell.
Unlike the internal cell data (which uses an Option), this cell type only implements Default
if the type parameter implements Default, and contains the relevant default value.
If you access the LoopCell while something else is holding on to the LoopCell value,
then you will not be able to obtain a value. You can also
create an empty LoopCell that cannot provide any access