Struct jupyter::JupyterMessage
source · pub struct JupyterMessage { /* private fields */ }
Expand description
Represent a message from jupyter client
Implementations§
source§impl JupyterMessage
impl JupyterMessage
sourcepub fn recast<T: DeserializeOwned>(&self) -> JupyterResult<T>
pub fn recast<T: DeserializeOwned>(&self) -> JupyterResult<T>
Change weakly typed content into strongly typed content.
sourcepub fn create_message(&self, kind: JupyterMessageType) -> JupyterMessage
pub fn create_message(&self, kind: JupyterMessageType) -> JupyterMessage
Creates a new child message of this message. ZMQ identities are not transferred.
sourcepub async fn send_state<S: SocketSend>(
&self,
connection: Arc<Mutex<Connection<S>>>,
busy: bool
) -> JupyterResult<()>
pub async fn send_state<S: SocketSend>( &self, connection: Arc<Mutex<Connection<S>>>, busy: bool ) -> JupyterResult<()>
Creates a reply to this message. This is a child message.
sourcepub fn as_reply(&self) -> JupyterMessage
pub fn as_reply(&self) -> JupyterMessage
Creates a reply to this message. This is a child with the message type determined automatically by replacing “request” with “reply”. ZMQ identities are transferred.
sourcepub fn with_content<T: Serialize>(
self,
content: T
) -> JupyterResult<JupyterMessage>
pub fn with_content<T: Serialize>( self, content: T ) -> JupyterResult<JupyterMessage>
Set the message content.
sourcepub fn with_message_type(self, msg_type: JupyterMessageType) -> JupyterMessage
pub fn with_message_type(self, msg_type: JupyterMessageType) -> JupyterMessage
Set the message type to “reply”.
sourcepub fn drop_parent_header(&mut self)
pub fn drop_parent_header(&mut self)
Set the message type to “reply”.
Trait Implementations§
source§impl Clone for JupyterMessage
impl Clone for JupyterMessage
source§fn clone(&self) -> JupyterMessage
fn clone(&self) -> JupyterMessage
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 JupyterMessage
impl Debug for JupyterMessage
Auto Trait Implementations§
impl RefUnwindSafe for JupyterMessage
impl Send for JupyterMessage
impl Sync for JupyterMessage
impl Unpin for JupyterMessage
impl UnwindSafe for JupyterMessage
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