pub struct Header {
pub msg_id: String,
pub username: String,
pub session: String,
pub date: DateTime<Utc>,
pub msg_type: String,
pub version: String,
}
Expand description
Represents a Jupyter message header.
The header contains metadata about the message, such as its unique identifier, the username of the sender, and the message type.
§Fields
msg_id
: A unique identifier for the message.username
: The name of the user who sent the message.session
: The session identifier.date
: The timestamp when the message was created.msg_type
: The type of message (e.g.,execute_request
).version
: The version of the messaging protocol.
§Example
use jupyter_protocol::messaging::Header;
let header = Header {
msg_id: "12345".to_string(),
username: "user".to_string(),
session: "session1".to_string(),
date: chrono::DateTime::from_timestamp_nanos(1234567890),
msg_type: "execute_request".to_string(),
version: "5.3".to_string(),
};
Fields§
§msg_id: String
§username: String
§session: String
§date: DateTime<Utc>
§msg_type: String
§version: String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Header
impl<'de> Deserialize<'de> for Header
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 Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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