pub struct RcEventSource<T>(/* private fields */);
Expand description
To share the data between coroutine itself and the coroutine internals
referring to the blocked event sources, RcEventSource
is being used.
Mioco event loop and coroutine itself never use the data in the same
time: either event loop or coroutine logic can be executing at the same
time. Technically this could use a pointer, but RefCell
is useful for
making sure no references are being kept when switching between these
two execution streams.
RcEventSource is parametrized over T
, but also implements
EventSourceTrait
to allow trait-object (dynamic-dispatch) access.
Implementations§
Trait Implementations§
Source§impl<T> EventSourceTrait for RcEventSource<T>where
T: EventSourceTrait,
impl<T> EventSourceTrait for RcEventSource<T>where
T: EventSourceTrait,
Auto Trait Implementations§
impl<T> Freeze for RcEventSource<T>
impl<T> !RefUnwindSafe for RcEventSource<T>
impl<T> !Send for RcEventSource<T>
impl<T> !Sync for RcEventSource<T>
impl<T> Unpin for RcEventSource<T>
impl<T> !UnwindSafe for RcEventSource<T>
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