pub struct CorOp<RETURN: 'static, RECEIVE: 'static> {
pub result_ch_sender: Arc<Mutex<Sender<Option<RETURN>>>>,
pub val: Option<RECEIVE>,
}
Expand description
CorOp
defines a yield action between Cor
objects.
§Arguments
RETURN
- The generic type of returned dataRECEIVE
- The generic type of received data
§Remarks
It’s the base of implementations of Cor
.
It contains the Cor
calling yield_from
() and the val sent together,
and it’s necessary to the target Cor
making the response by yield_ref
()/yield_none
().
Fields§
§result_ch_sender: Arc<Mutex<Sender<Option<RETURN>>>>
§val: Option<RECEIVE>
Auto Trait Implementations§
impl<RETURN, RECEIVE> Freeze for CorOp<RETURN, RECEIVE>where
RECEIVE: Freeze,
impl<RETURN, RECEIVE> RefUnwindSafe for CorOp<RETURN, RECEIVE>where
RECEIVE: RefUnwindSafe,
impl<RETURN, RECEIVE> Send for CorOp<RETURN, RECEIVE>
impl<RETURN, RECEIVE> Sync for CorOp<RETURN, RECEIVE>
impl<RETURN, RECEIVE> Unpin for CorOp<RETURN, RECEIVE>where
RECEIVE: Unpin,
impl<RETURN, RECEIVE> UnwindSafe for CorOp<RETURN, RECEIVE>where
RECEIVE: UnwindSafe,
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