pub enum Channel {
Shell,
Control,
Stdin,
IOPub,
Heartbeat,
}
Expand description
Represents the different channels in the Jupyter messaging protocol.
Each channel serves a specific purpose in the communication between Jupyter clients and kernels.
§Variants
Shell
: Used for request/reply-style messages.Control
: Similar toShell
, but for high-priority messages.Stdin
: Used for input requests from the kernel.IOPub
: Used for broadcasting results, errors, and other messages.Heartbeat
: Used to check the kernel’s responsiveness.
§Example
use jupyter_protocol::messaging::Channel;
let channel = Channel::Shell;
match channel {
Channel::Shell => println!("Using the shell channel"),
_ => println!("Using another channel"),
}
Variants§
Shell
Used for request/reply-style messages.
Control
Similar to Shell
, but for high-priority messages.
Stdin
Used for input requests from the kernel.
IOPub
Used for broadcasting results, errors, and other messages.
Heartbeat
Used to check the kernel’s responsiveness.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Channel
impl<'de> Deserialize<'de> for Channel
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
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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