pub struct ShutdownReply {
pub restart: bool,
pub status: ReplyStatus,
pub error: Option<Box<ReplyError>>,
}
Expand description
Reply to a shutdown request.
This message is sent by the kernel in response to a ShutdownRequest
.
It confirms that the kernel is shutting down.
See https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-shutdown
Fields§
§restart: bool
§status: ReplyStatus
§error: Option<Box<ReplyError>>
Implementations§
Source§impl ShutdownReply
impl ShutdownReply
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 ShutdownReply
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::ShutdownReply;
let parent_message = JupyterMessage::new(jupyter_protocol::UnknownMessage {
msg_type: "example".to_string(),
content: serde_json::json!({ "key": "value" }),
}, None);
let child_message = ShutdownReply{
..Default::default()
}.as_child_of(&parent_message);
// Next you would send the `child_message` over the connection
Trait Implementations§
Source§impl Clone for ShutdownReply
impl Clone for ShutdownReply
Source§fn clone(&self) -> ShutdownReply
fn clone(&self) -> ShutdownReply
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 ShutdownReply
impl Debug for ShutdownReply
Source§impl Default for ShutdownReply
impl Default for ShutdownReply
Source§fn default() -> ShutdownReply
fn default() -> ShutdownReply
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ShutdownReply
impl<'de> Deserialize<'de> for ShutdownReply
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShutdownReply, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShutdownReply, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ShutdownReply> for JupyterMessage
impl From<ShutdownReply> for JupyterMessage
Source§impl From<ShutdownReply> for JupyterMessageContent
impl From<ShutdownReply> for JupyterMessageContent
Source§fn from(content: ShutdownReply) -> JupyterMessageContent
fn from(content: ShutdownReply) -> JupyterMessageContent
Create a new JupyterMessageContent
for a ShutdownReply
.
Source§impl Serialize for ShutdownReply
impl Serialize for ShutdownReply
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 ShutdownReply
impl RefUnwindSafe for ShutdownReply
impl Send for ShutdownReply
impl Sync for ShutdownReply
impl Unpin for ShutdownReply
impl UnwindSafe for ShutdownReply
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