async fn check_layer_preamble<S: Unpin+Stream<Item=RenderAction>>(stream: &mut S) {
    let select_render_target = stream.next().await;
    assert!(match select_render_target { Some(RenderAction::SelectRenderTarget(_)) => true, _ => false });

    let set_blend_mode = stream.next().await;
    assert!(match set_blend_mode { Some(RenderAction::BlendMode(render::BlendMode::DestinationOver)) => true, _ => false });

    let use_shader = stream.next().await;
    assert!(match use_shader { Some(RenderAction::UseShader(_)) => true, _ => false });

    let set_transform = stream.next().await;
    assert!(match set_transform { Some(RenderAction::SetTransform(_)) => true, _ => false });
}
///
/// Checks that the instructions beginning a new layer are valid
///
Checks that the instructions beginning a new layer are valid
Checks that the instructions beginning a new layer are valid
async fn check_layer_preamble<S: Unpin+Stream<Item=RenderAction>>(stream: &mut S) {
    let select_render_target = stream.next().await;
    assert!(match select_render_target { Some(RenderAction::SelectRenderTarget(_)) => true, _ => false });
    let set_blend_mode = stream.next().await;
    assert!(match set_blend_mode { Some(RenderAction::BlendMode(render::BlendMode::DestinationOver)) => true, _ => false });
    let use_shader = stream.next().await;
    assert!(match use_shader { Some(RenderAction::UseShader(_)) => true, _ => false });
    let set_transform = stream.next().await;
    assert!(match set_transform { Some(RenderAction::SetTransform(_)) => true, _ => false });
}
async fn check_layer_preamble < S : Unpin + Stream < Item = RenderAction > > ( stream : & mut S ) { let select_render_target = stream . next ( ) . await ; assert ! ( match select_render_target { Some ( RenderAction SelectRenderTarget ( ) ) true false } ) ; let set_blend_mode = stream . next ( ) . await ; assert ! ( match set_blend_mode { Some ( RenderAction BlendMode ( render BlendMode DestinationOver ) ) true false } ) ; let use_shader = stream . next ( ) . await ; assert ! ( match use_shader { Some ( RenderAction UseShader ( ) ) true false } ) ; let set_transform = stream . next ( ) . await ; assert ! ( match set_transform { Some ( RenderAction SetTransform ( ) ) true false } ) ; }
Checks that the instructions beginning a new layer are valid
Checks that the instructions beginning a new layer are valid
stream
&mut S