pub struct CommInfoReply {
pub status: ReplyStatus,
pub comms: HashMap<CommId, CommInfo>,
pub error: Option<Box<ReplyError>>,
}
Fields§
§status: ReplyStatus
§comms: HashMap<CommId, CommInfo>
§error: Option<Box<ReplyError>>
Implementations§
Source§impl CommInfoReply
impl CommInfoReply
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 CommInfoReply
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::CommInfoReply;
let parent_message = JupyterMessage::new(jupyter_protocol::UnknownMessage {
msg_type: "example".to_string(),
content: serde_json::json!({ "key": "value" }),
}, None);
let child_message = CommInfoReply{
..Default::default()
}.as_child_of(&parent_message);
// Next you would send the `child_message` over the connection
Trait Implementations§
Source§impl Clone for CommInfoReply
impl Clone for CommInfoReply
Source§fn clone(&self) -> CommInfoReply
fn clone(&self) -> CommInfoReply
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 CommInfoReply
impl Debug for CommInfoReply
Source§impl Default for CommInfoReply
impl Default for CommInfoReply
Source§impl<'de> Deserialize<'de> for CommInfoReply
impl<'de> Deserialize<'de> for CommInfoReply
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<CommInfoReply> for JupyterMessage
impl From<CommInfoReply> for JupyterMessage
Source§impl From<CommInfoReply> for JupyterMessageContent
impl From<CommInfoReply> for JupyterMessageContent
Source§fn from(content: CommInfoReply) -> Self
fn from(content: CommInfoReply) -> Self
Create a new JupyterMessageContent
for a CommInfoReply
.
Auto Trait Implementations§
impl Freeze for CommInfoReply
impl RefUnwindSafe for CommInfoReply
impl Send for CommInfoReply
impl Sync for CommInfoReply
impl Unpin for CommInfoReply
impl UnwindSafe for CommInfoReply
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