mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
update comments
This commit is contained in:
parent
3f6688b824
commit
748ccabebb
1 changed files with 9 additions and 7 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue