Struct futures_util::future::Shared
source · [−]pub struct Shared<Fut: Future> { /* private fields */ }
Expand description
Future for the shared
method.
Implementations
Creates a new WeakShared
for this Shared
.
Returns None
if it has already been polled to completion.
Gets the number of strong pointers to this allocation.
Returns None
if it has already been polled to completion.
Safety
This method by itself is safe, but using it correctly requires extra care. Another thread can change the strong count at any time, including potentially between calling this method and acting on the result.
Gets the number of weak pointers to this allocation.
Returns None
if it has already been polled to completion.
Safety
This method by itself is safe, but using it correctly requires extra care. Another thread can change the weak count at any time, including potentially between calling this method and acting on the result.
Trait Implementations
Returns true
if the underlying future should no longer be polled.
Auto Trait Implementations
impl<Fut> !RefUnwindSafe for Shared<Fut>
impl<Fut> !UnwindSafe for Shared<Fut>
Blanket Implementations
Mutably borrows from an owned value. Read more
into_future
)The output that the future will produce on completion.
type Future = F
type Future = F
into_future
)Which kind of future are we turning this into?
into_future
)Creates a future from a value.