pub struct ExecuteInput {
pub code: String,
pub execution_count: ExecutionCount,
}
Expand description
An execute_input
message on the iopub
channel.
See Execute Input.
To let all frontends know what code is being executed at any given time, these messages contain a re-broadcast of the code portion of an execute_request, along with the execution_count.
Fields§
§code: String
§execution_count: ExecutionCount
Implementations§
Source§impl ExecuteInput
impl ExecuteInput
Sourcepub fn as_child_of(&self, parent: &JupyterMessage) -> JupyterMessage
pub fn as_child_of(&self, parent: &JupyterMessage) -> JupyterMessage
Create a new JupyterMessage
, assigning the parent for a ExecuteInput
message.
This method creates a new JupyterMessage
with the right content, parent header, and zmq identities, making
it suitable for sending over ZeroMQ.
§Example
use jupyter_protocol::messaging::{JupyterMessage, JupyterMessageContent};
use jupyter_protocol::ExecuteInput;
let parent_message = JupyterMessage::new(jupyter_protocol::UnknownMessage {
msg_type: "example".to_string(),
content: serde_json::json!({ "key": "value" }),
}, None);
let child_message = ExecuteInput{
..Default::default()
}.as_child_of(&parent_message);
// Next you would send the `child_message` over the connection
Trait Implementations§
Source§impl Clone for ExecuteInput
impl Clone for ExecuteInput
Source§fn clone(&self) -> ExecuteInput
fn clone(&self) -> ExecuteInput
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ExecuteInput
impl Debug for ExecuteInput
Source§impl Default for ExecuteInput
impl Default for ExecuteInput
Source§fn default() -> ExecuteInput
fn default() -> ExecuteInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExecuteInput
impl<'de> Deserialize<'de> for ExecuteInput
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecuteInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecuteInput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ExecuteInput> for JupyterMessage
impl From<ExecuteInput> for JupyterMessage
Source§impl From<ExecuteInput> for JupyterMessageContent
impl From<ExecuteInput> for JupyterMessageContent
Source§fn from(content: ExecuteInput) -> JupyterMessageContent
fn from(content: ExecuteInput) -> JupyterMessageContent
Create a new JupyterMessageContent
for a ExecuteInput
.
Source§impl Serialize for ExecuteInput
impl Serialize for ExecuteInput
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ExecuteInput
impl RefUnwindSafe for ExecuteInput
impl Send for ExecuteInput
impl Sync for ExecuteInput
impl Unpin for ExecuteInput
impl UnwindSafe for ExecuteInput
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