A Fragile<T> wraps a non sendable T to be safely send to other threads.
Once the value has been wrapped it can be sent to other threads but access
to the value on those threads will fail.
If the value needs destruction and the fragile wrapper is on another thread
the destructor will panic. Alternatively you can use
Sticky, which does not panic and instead retains the
value until the originating thread exits.
Polling a Fragile as a Future or Stream moves its value to stable heap
storage before the first poll. If a polled Fragile with drop glue is dropped
on another thread, that storage is leaked to preserve the value’s pinning
invariant. A Fragile<T> is Unpin only if T is Unpin.
The value that is moved into the Fragile can be non Send and
will be anchored to the thread that created the object. If the
fragile wrapper type ends up being send from thread to thread
only the original thread can interact with the value.
Consumes the Fragile, returning the wrapped value if successful.
The wrapped value is returned if this is called from the same thread
as the one where the original value was created, otherwise the
Fragile is returned as Err(self).
Attempt to pull out the next value of this stream, registering the
current task for wakeup if the value is not yet available, and returning
None if the stream is exhausted. Read more