pub struct ShutdownReply {
pub restart: bool,
pub status: ReplyStatus,
pub error: Option<Box<ReplyError>>,
}
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};
let message = connection.recv().await?;
let child_message = ShutdownReply{
// ...
}.as_child_of(&message);
connection.send(child_message).await?;
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<'de> Deserialize<'de> for ShutdownReply
impl<'de> Deserialize<'de> for ShutdownReply
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<ShutdownReply> for JupyterMessage
impl From<ShutdownReply> for JupyterMessage
Source§fn from(content: ShutdownReply) -> Self
fn from(content: ShutdownReply) -> Self
Create a new JupyterMessage
for a ShutdownReply
.
⚠️ 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.
Source§impl From<ShutdownReply> for JupyterMessageContent
impl From<ShutdownReply> for JupyterMessageContent
Source§fn from(content: ShutdownReply) -> Self
fn from(content: ShutdownReply) -> Self
Create a new JupyterMessageContent
for a ShutdownReply
.
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