docs: add rustdoc comments
This commit is contained in:
+6
-6
@@ -1,14 +1,20 @@
|
||||
//! Subscription close request parsing
|
||||
use crate::error::{Error, Result};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Close command in network format
|
||||
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
|
||||
pub struct CloseCmd {
|
||||
/// Protocol command, expected to always be "CLOSE".
|
||||
cmd: String,
|
||||
/// The subscription identifier being closed.
|
||||
id: String,
|
||||
}
|
||||
|
||||
/// Close command parsed
|
||||
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
|
||||
pub struct Close {
|
||||
/// The subscription identifier being closed.
|
||||
pub id: String,
|
||||
}
|
||||
|
||||
@@ -22,9 +28,3 @@ impl From<CloseCmd> for Result<Close> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Close {
|
||||
pub fn get_id(&self) -> String {
|
||||
self.id.clone()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user