pub struct ExecuteRequest {
pub code: String,
pub silent: bool,
pub store_history: bool,
pub user_expressions: Option<HashMap<String, String>>,
pub allow_stdin: bool,
pub stop_on_error: bool,
}
Expand description
A request for code execution.
See https://jupyter-client.readthedocs.io/en/latest/messaging.html#execute
Fields§
§code: String
§silent: bool
§store_history: bool
§user_expressions: Option<HashMap<String, String>>
§allow_stdin: bool
§stop_on_error: bool
Implementations§
Source§impl ExecuteRequest
impl ExecuteRequest
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 ExecuteRequest
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::ExecuteRequest;
let parent_message = JupyterMessage::new(jupyter_protocol::UnknownMessage {
msg_type: "example".to_string(),
content: serde_json::json!({ "key": "value" }),
}, None);
let child_message = ExecuteRequest{
..Default::default()
}.as_child_of(&parent_message);
// Next you would send the `child_message` over the connection
Trait Implementations§
Source§impl Clone for ExecuteRequest
impl Clone for ExecuteRequest
Source§fn clone(&self) -> ExecuteRequest
fn clone(&self) -> ExecuteRequest
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 ExecuteRequest
impl Debug for ExecuteRequest
Source§impl Default for ExecuteRequest
impl Default for ExecuteRequest
Source§impl<'de> Deserialize<'de> for ExecuteRequest
impl<'de> Deserialize<'de> for ExecuteRequest
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<ExecuteRequest> for JupyterMessage
impl From<ExecuteRequest> for JupyterMessage
Source§impl From<ExecuteRequest> for JupyterMessageContent
impl From<ExecuteRequest> for JupyterMessageContent
Source§fn from(content: ExecuteRequest) -> Self
fn from(content: ExecuteRequest) -> Self
Create a new JupyterMessageContent
for a ExecuteRequest
.
Auto Trait Implementations§
impl Freeze for ExecuteRequest
impl RefUnwindSafe for ExecuteRequest
impl Send for ExecuteRequest
impl Sync for ExecuteRequest
impl Unpin for ExecuteRequest
impl UnwindSafe for ExecuteRequest
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