pub struct IoPubWelcome {
pub subscription: String,
}Expand description
An iopub_welcome message on the iopub channel.
Per JEP 65, when IOPub is implemented as XPUB, this message is sent to clients upon subscription to indicate the kernel is ready to publish.
See JEP 65
Fields§
§subscription: StringThe subscription topic that was received from the client. Typically an empty string for wildcard subscriptions.
Implementations§
Source§impl IoPubWelcome
impl IoPubWelcome
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 IoPubWelcome 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::IoPubWelcome;
let parent_message = JupyterMessage::new(jupyter_protocol::UnknownMessage {
msg_type: "example".to_string(),
content: serde_json::json!({ "key": "value" }),
}, None);
let child_message = IoPubWelcome{
..Default::default()
}.as_child_of(&parent_message);
// Next you would send the `child_message` over the connection
Trait Implementations§
Source§impl Clone for IoPubWelcome
impl Clone for IoPubWelcome
Source§fn clone(&self) -> IoPubWelcome
fn clone(&self) -> IoPubWelcome
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IoPubWelcome
impl Debug for IoPubWelcome
Source§impl Default for IoPubWelcome
impl Default for IoPubWelcome
Source§fn default() -> IoPubWelcome
fn default() -> IoPubWelcome
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IoPubWelcome
impl<'de> Deserialize<'de> for IoPubWelcome
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<IoPubWelcome> for JupyterMessage
impl From<IoPubWelcome> for JupyterMessage
Source§impl From<IoPubWelcome> for JupyterMessageContent
impl From<IoPubWelcome> for JupyterMessageContent
Source§fn from(content: IoPubWelcome) -> Self
fn from(content: IoPubWelcome) -> Self
Create a new JupyterMessageContent for a IoPubWelcome.
Auto Trait Implementations§
impl Freeze for IoPubWelcome
impl RefUnwindSafe for IoPubWelcome
impl Send for IoPubWelcome
impl Sync for IoPubWelcome
impl Unpin for IoPubWelcome
impl UnwindSafe for IoPubWelcome
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)