---
source: quic/s2n-quic-core/src/stream/state/send.rs
expression: "Sender::test_transitions()"
---
{
    DataRecvd: {
        on_send_stream: Err(
            InvalidTransition {
                current: DataRecvd,
                event: "on_send_stream",
            },
        ),
        on_send_fin: Err(
            InvalidTransition {
                current: DataRecvd,
                event: "on_send_fin",
            },
        ),
        on_recv_all_acks: Err(
            NoOp {
                current: DataRecvd,
            },
        ),
        on_queue_reset: Err(
            InvalidTransition {
                current: DataRecvd,
                event: "on_queue_reset",
            },
        ),
        on_send_reset: Err(
            InvalidTransition {
                current: DataRecvd,
                event: "on_send_reset",
            },
        ),
        on_recv_reset_ack: Err(
            InvalidTransition {
                current: DataRecvd,
                event: "on_recv_reset_ack",
            },
        ),
    },
    DataSent: {
        on_send_stream: Err(
            InvalidTransition {
                current: DataSent,
                event: "on_send_stream",
            },
        ),
        on_send_fin: Err(
            NoOp {
                current: DataSent,
            },
        ),
        on_recv_all_acks: Ok(
            DataRecvd,
        ),
        on_queue_reset: Ok(
            ResetQueued,
        ),
        on_send_reset: Ok(
            ResetSent,
        ),
        on_recv_reset_ack: Err(
            InvalidTransition {
                current: DataSent,
                event: "on_recv_reset_ack",
            },
        ),
    },
    Ready: {
        on_send_stream: Ok(
            Send,
        ),
        on_send_fin: Ok(
            DataSent,
        ),
        on_recv_all_acks: Err(
            InvalidTransition {
                current: Ready,
                event: "on_recv_all_acks",
            },
        ),
        on_queue_reset: Ok(
            ResetQueued,
        ),
        on_send_reset: Ok(
            ResetSent,
        ),
        on_recv_reset_ack: Err(
            InvalidTransition {
                current: Ready,
                event: "on_recv_reset_ack",
            },
        ),
    },
    ResetQueued: {
        on_send_stream: Err(
            InvalidTransition {
                current: ResetQueued,
                event: "on_send_stream",
            },
        ),
        on_send_fin: Err(
            InvalidTransition {
                current: ResetQueued,
                event: "on_send_fin",
            },
        ),
        on_recv_all_acks: Ok(
            DataRecvd,
        ),
        on_queue_reset: Err(
            NoOp {
                current: ResetQueued,
            },
        ),
        on_send_reset: Ok(
            ResetSent,
        ),
        on_recv_reset_ack: Err(
            InvalidTransition {
                current: ResetQueued,
                event: "on_recv_reset_ack",
            },
        ),
    },
    ResetRecvd: {
        on_send_stream: Err(
            InvalidTransition {
                current: ResetRecvd,
                event: "on_send_stream",
            },
        ),
        on_send_fin: Err(
            InvalidTransition {
                current: ResetRecvd,
                event: "on_send_fin",
            },
        ),
        on_recv_all_acks: Err(
            InvalidTransition {
                current: ResetRecvd,
                event: "on_recv_all_acks",
            },
        ),
        on_queue_reset: Err(
            InvalidTransition {
                current: ResetRecvd,
                event: "on_queue_reset",
            },
        ),
        on_send_reset: Err(
            InvalidTransition {
                current: ResetRecvd,
                event: "on_send_reset",
            },
        ),
        on_recv_reset_ack: Err(
            NoOp {
                current: ResetRecvd,
            },
        ),
    },
    ResetSent: {
        on_send_stream: Err(
            InvalidTransition {
                current: ResetSent,
                event: "on_send_stream",
            },
        ),
        on_send_fin: Err(
            InvalidTransition {
                current: ResetSent,
                event: "on_send_fin",
            },
        ),
        on_recv_all_acks: Err(
            InvalidTransition {
                current: ResetSent,
                event: "on_recv_all_acks",
            },
        ),
        on_queue_reset: Err(
            InvalidTransition {
                current: ResetSent,
                event: "on_queue_reset",
            },
        ),
        on_send_reset: Err(
            NoOp {
                current: ResetSent,
            },
        ),
        on_recv_reset_ack: Ok(
            ResetRecvd,
        ),
    },
    Send: {
        on_send_stream: Err(
            NoOp {
                current: Send,
            },
        ),
        on_send_fin: Ok(
            DataSent,
        ),
        on_recv_all_acks: Err(
            InvalidTransition {
                current: Send,
                event: "on_recv_all_acks",
            },
        ),
        on_queue_reset: Ok(
            ResetQueued,
        ),
        on_send_reset: Ok(
            ResetSent,
        ),
        on_recv_reset_ack: Err(
            InvalidTransition {
                current: Send,
                event: "on_recv_reset_ack",
            },
        ),
    },
}
