pub struct CommClose {
pub comm_id: CommId,
pub data: Map<String, Value>,
}
Expand description
A comm_close
message on the 'iopub'
channel.
Since comms live on both sides, when a comm is destroyed the other side must be notified. This is done with a comm_close message.
Fields§
§comm_id: CommId
§data: Map<String, Value>
Implementations§
Source§impl CommClose
impl CommClose
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 CommClose
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 = CommClose{
// ...
}.as_child_of(&message);
connection.send(child_message).await?;
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CommClose
impl<'de> Deserialize<'de> for CommClose
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<CommClose> for JupyterMessage
impl From<CommClose> for JupyterMessage
Source§impl From<CommClose> for JupyterMessageContent
impl From<CommClose> for JupyterMessageContent
Auto Trait Implementations§
impl Freeze for CommClose
impl RefUnwindSafe for CommClose
impl Send for CommClose
impl Sync for CommClose
impl Unpin for CommClose
impl UnwindSafe for CommClose
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