pub trait JmapCoroutine {
type Yield;
type Return;
// Required method
fn resume(
&mut self,
arg: Option<&[u8]>,
) -> JmapCoroutineState<Self::Yield, Self::Return>;
}Expand description
Standard-shape JMAP coroutine.
Required Associated Types§
Required Methods§
Sourcefn resume(
&mut self,
arg: Option<&[u8]>,
) -> JmapCoroutineState<Self::Yield, Self::Return>
fn resume( &mut self, arg: Option<&[u8]>, ) -> JmapCoroutineState<Self::Yield, Self::Return>
Advances the coroutine one step.
Pass None on the initial call or after a JmapYield::WantsWrite.
Pass Some(data) after a JmapYield::WantsRead; Some(&[]) signals
EOF.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".