Expand description
Module for the Message struct.
This module provides the Message struct and associated method to create and manage messages.
The Message struct encapsulates the ID, content, and timestamp of a message.
It includes implementations for creating a new message, converting to and from a string,
and displaying the message in a human-readable format.
§Example
use pilgrimage::message::message::Message;
use chrono::Utc;
// Create a new message with content "Hello, world!"
let message = Message::new(String::from("Hello, world!"));
// Check the content of the message
assert_eq!(message.content, "Hello, world!");Structs§
- Message
- Represents a message with an ID, content, and timestamp.