Struct runtimelib::messaging::content::ExecuteResult
source · pub struct ExecuteResult {
pub execution_count: usize,
pub data: MimeBundle,
pub metadata: HashMap<String, Value>,
pub transient: Option<Transient>,
}
Expand description
An 'execute_result'
message on the 'iopub'
channel.
See Execute Result.
The is the “result”, in the REPL sense from execution. As an example, the following Python code:
>>> 3 + 4
7
would have an 'execute_result'
message with the following content:
{
"execution_count": 1,
"data": {
"text/plain": "7"
},
"metadata": {},
"transient": {}
}
Fields§
§execution_count: usize
§data: MimeBundle
§metadata: HashMap<String, Value>
§transient: Option<Transient>
Trait Implementations§
source§impl AsChildOf for ExecuteResult
impl AsChildOf for ExecuteResult
source§fn as_child_of(self, parent: &JupyterMessage) -> JupyterMessage
fn as_child_of(self, parent: &JupyterMessage) -> JupyterMessage
Create a new JupyterMessage
, assigning the parent for a ExecuteResult
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 runtimelib::messaging::{JupyterMessage, JupyterMessageContent, AsChildOf};
let message = connection.recv().await?;
let child_message = ExecuteResult{
// ...
}.as_child_of(&message);
connection.send(child_message).await?;
source§impl Clone for ExecuteResult
impl Clone for ExecuteResult
source§fn clone(&self) -> ExecuteResult
fn clone(&self) -> ExecuteResult
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 ExecuteResult
impl Debug for ExecuteResult
source§impl<'de> Deserialize<'de> for ExecuteResult
impl<'de> Deserialize<'de> for ExecuteResult
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ExecuteResult> for JupyterMessage
impl From<ExecuteResult> for JupyterMessage
source§fn from(content: ExecuteResult) -> Self
fn from(content: ExecuteResult) -> Self
Create a new JupyterMessage
for a ExecuteResult
.
⚠️ If you use this method, you must set the zmq identities yourself. If you have a message that
“caused” your message to be sent, use that message with as_child_of
instead.
Auto Trait Implementations§
impl Freeze for ExecuteResult
impl RefUnwindSafe for ExecuteResult
impl Send for ExecuteResult
impl Sync for ExecuteResult
impl Unpin for ExecuteResult
impl UnwindSafe for ExecuteResult
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