pub struct ErrorOutput {
pub ename: String,
pub evalue: String,
pub traceback: Vec<String>,
}
Expand description
An error
message on the iopub
channel.
See Error.
These are errors that occur during execution from user code. Syntax errors, runtime errors, etc.
Fields§
§ename: String
§evalue: String
§traceback: Vec<String>
Implementations§
Source§impl ErrorOutput
impl ErrorOutput
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 ErrorOutput
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::ErrorOutput;
let parent_message = JupyterMessage::new(jupyter_protocol::UnknownMessage {
msg_type: "example".to_string(),
content: serde_json::json!({ "key": "value" }),
}, None);
let child_message = ErrorOutput{
..Default::default()
}.as_child_of(&parent_message);
// Next you would send the `child_message` over the connection
Trait Implementations§
Source§impl Clone for ErrorOutput
impl Clone for ErrorOutput
Source§fn clone(&self) -> ErrorOutput
fn clone(&self) -> ErrorOutput
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 ErrorOutput
impl Debug for ErrorOutput
Source§impl Default for ErrorOutput
impl Default for ErrorOutput
Source§fn default() -> ErrorOutput
fn default() -> ErrorOutput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ErrorOutput
impl<'de> Deserialize<'de> for ErrorOutput
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorOutput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorOutput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ErrorOutput> for JupyterMessage
impl From<ErrorOutput> for JupyterMessage
Source§impl From<ErrorOutput> for JupyterMessageContent
impl From<ErrorOutput> for JupyterMessageContent
Source§fn from(content: ErrorOutput) -> JupyterMessageContent
fn from(content: ErrorOutput) -> JupyterMessageContent
Create a new JupyterMessageContent
for a ErrorOutput
.
Source§impl Serialize for ErrorOutput
impl Serialize for ErrorOutput
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 ErrorOutput
impl RefUnwindSafe for ErrorOutput
impl Send for ErrorOutput
impl Sync for ErrorOutput
impl Unpin for ErrorOutput
impl UnwindSafe for ErrorOutput
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