update comments

This commit is contained in:
yggverse 2024-11-01 05:28:36 +02:00
parent 3f6688b824
commit 748ccabebb

View file

@ -1,3 +1,6 @@
//! Components for reading and parsing meta **data** bytes from response
//! (e.g. placeholder text for 10, 11, url string for 30, 31 etc)
pub mod error; pub mod error;
pub use error::Error; pub use error::Error;
@ -5,19 +8,18 @@ use glib::GString;
pub const MAX_LEN: usize = 0x400; // 1024 pub const MAX_LEN: usize = 0x400; // 1024
/// Meta data holder for response /// Meta **data** holder
/// ///
/// Could be created from entire response buffer or just header slice /// For example, `value` could contain:
/// /// * placeholder text for 10, 11 status
/// Use as: /// * URL string for 30, 31 status
/// * placeholder for 10, 11 status
/// * URL for 30, 31 status
pub struct Data { pub struct Data {
value: GString, value: GString,
} }
impl Data { impl Data {
/// Parse meta data from UTF-8 buffer /// Parse meta **data** from UTF-8 buffer
/// from entire response or just header slice
/// ///
/// * result could be `None` for some [status codes](https://geminiprotocol.net/docs/protocol-specification.gmi#status-codes) /// * result could be `None` for some [status codes](https://geminiprotocol.net/docs/protocol-specification.gmi#status-codes)
/// that does not expect any data in header /// that does not expect any data in header