Added documentation.

This commit is contained in:
Micheal Smith
2025-11-22 06:20:56 -06:00
parent 17b087e618
commit b46a03c13e
10 changed files with 163 additions and 77 deletions

View File

@@ -1,13 +1,19 @@
//! Internal representations of incoming events.
use irc::proto::{Command, Message};
use serde::{Deserialize, Serialize};
/// Represents an event. Probably from IRC.
#[derive(Deserialize, Serialize)]
pub struct Event {
/// Who is the message from?
from: String,
/// What is the message?
message: String,
}
impl Event {
/// Creates a new message.
pub fn new(from: impl Into<String>, msg: impl Into<String>) -> Self {
Self {
from: from.into(),