mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 09:05:45 +00:00
make final codes public, add comments
This commit is contained in:
parent
4eb998ef20
commit
473ed48715
6 changed files with 20 additions and 11 deletions
|
|
@ -1,9 +1,10 @@
|
|||
pub mod error;
|
||||
pub use error::Error;
|
||||
|
||||
const CODE: &[u8] = b"61";
|
||||
/// [Not Authorized](https://geminiprotocol.net/docs/protocol-specification.gmi#status-61) status code
|
||||
pub const CODE: &[u8] = b"61";
|
||||
|
||||
/// Hold header `String` for [61](https://geminiprotocol.net/docs/protocol-specification.gmi#status-61) status code
|
||||
/// Hold header `String` for [Not Authorized](https://geminiprotocol.net/docs/protocol-specification.gmi#status-61) status code
|
||||
/// * this response type does not contain body data
|
||||
/// * the header member is closed to require valid construction
|
||||
pub struct NotAuthorized(String);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
pub mod error;
|
||||
pub use error::Error;
|
||||
|
||||
const CODE: &[u8] = b"62";
|
||||
/// [Not Valid](https://geminiprotocol.net/docs/protocol-specification.gmi#status-62) status code
|
||||
pub const CODE: &[u8] = b"62";
|
||||
|
||||
/// Hold header `String` for [62](https://geminiprotocol.net/docs/protocol-specification.gmi#status-62) status code
|
||||
/// Hold header `String` for [Not Valid](https://geminiprotocol.net/docs/protocol-specification.gmi#status-62) status code
|
||||
/// * this response type does not contain body data
|
||||
/// * the header member is closed to require valid construction
|
||||
pub struct NotValid(String);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
pub mod error;
|
||||
pub use error::Error;
|
||||
|
||||
const CODE: &[u8] = b"60";
|
||||
/// [Certificate Required](https://geminiprotocol.net/docs/protocol-specification.gmi#status-60) status code
|
||||
pub const CODE: &[u8] = b"60";
|
||||
|
||||
/// Hold header `String` for [60](https://geminiprotocol.net/docs/protocol-specification.gmi#status-60) status code
|
||||
/// Hold header `String` for [Certificate Required](https://geminiprotocol.net/docs/protocol-specification.gmi#status-60) status code
|
||||
/// * this response type does not contain body data
|
||||
/// * the header member is closed to require valid construction
|
||||
pub struct Required(String);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
pub mod error;
|
||||
pub use error::Error;
|
||||
|
||||
const CODE: &[u8] = b"10";
|
||||
/// [Input Expected](https://geminiprotocol.net/docs/protocol-specification.gmi#status-10) status code
|
||||
pub const CODE: &[u8] = b"10";
|
||||
|
||||
/// Hold header `String` for [10](https://geminiprotocol.net/docs/protocol-specification.gmi#status-10) status code
|
||||
/// Hold header `String` for [Input Expected](https://geminiprotocol.net/docs/protocol-specification.gmi#status-10) status code
|
||||
/// * this response type does not contain body data
|
||||
/// * the header member is closed to require valid construction
|
||||
pub struct Default(String);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
pub mod error;
|
||||
pub use error::Error;
|
||||
|
||||
const CODE: &[u8] = b"11";
|
||||
/// [Sensitive Input](https://geminiprotocol.net/docs/protocol-specification.gmi#status-11-sensitive-input) status code
|
||||
pub const CODE: &[u8] = b"11";
|
||||
|
||||
/// Hold header `String` for [11](https://geminiprotocol.net/docs/protocol-specification.gmi#status-11-sensitive-input) status code
|
||||
/// Hold header `String` for [Sensitive Input](https://geminiprotocol.net/docs/protocol-specification.gmi#status-11-sensitive-input) status code
|
||||
/// * this response type does not contain body data
|
||||
/// * the header member is closed to require valid construction
|
||||
pub struct Sensitive(String);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@ pub mod header;
|
|||
pub use error::Error;
|
||||
pub use header::Header;
|
||||
|
||||
const CODE: &[u8] = b"20";
|
||||
/// [Success](https://geminiprotocol.net/docs/protocol-specification.gmi#success) status code
|
||||
pub const CODE: &[u8] = b"20";
|
||||
|
||||
/// Holder for [Success](https://geminiprotocol.net/docs/protocol-specification.gmi#success) status code
|
||||
/// * this response type MAY contain body data
|
||||
/// * the header has closed members to require valid construction
|
||||
pub struct Default {
|
||||
pub header: Header,
|
||||
pub content: Option<Vec<u8>>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue