kernel_sidecar/jupyter/iopub_content/
execute_input.rs

1/*
2https://jupyter-client.readthedocs.io/en/latest/messaging.html#code-inputs
3*/
4
5use bytes::Bytes;
6use serde::Deserialize;
7
8#[allow(dead_code)]
9#[derive(Deserialize, Debug)]
10pub struct ExecuteInput {
11    code: String,
12    execution_count: u32,
13}
14
15impl From<Bytes> for ExecuteInput {
16    fn from(bytes: Bytes) -> Self {
17        serde_json::from_slice(&bytes).expect("Failed to deserialize ExecuteInput")
18    }
19}