parsers: correct cargo doc warnings

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-12-27 16:31:58 +01:00
parent 200147b551
commit afcf9fb2d0
13 changed files with 36 additions and 34 deletions

View file

@ -2,6 +2,7 @@ Version xxx:
xxx xxx
* Improvements: * Improvements:
- muc::user::Item: Added with_ helpers - muc::user::Item: Added with_ helpers
- Correct cargo doc warnings
Version 0.19.2: Version 0.19.2:
2022-12-17 Maxime “pep” Buquet <pep@bouah.net> 2022-12-17 Maxime “pep” Buquet <pep@bouah.net>

View file

@ -15,7 +15,7 @@ use std::str::FromStr;
/// The request for resource binding, which is the process by which a client /// The request for resource binding, which is the process by which a client
/// can obtain a full JID and start exchanging on the XMPP network. /// can obtain a full JID and start exchanging on the XMPP network.
/// ///
/// See https://xmpp.org/rfcs/rfc6120.html#bind /// See <https://xmpp.org/rfcs/rfc6120.html#bind>
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
pub struct BindQuery { pub struct BindQuery {
/// Requests this resource, the server may associate another one though. /// Requests this resource, the server may associate another one though.
@ -72,7 +72,7 @@ impl From<BindQuery> for Element {
/// The response for resource binding, containing the clients full JID. /// The response for resource binding, containing the clients full JID.
/// ///
/// See https://xmpp.org/rfcs/rfc6120.html#bind /// See <https://xmpp.org/rfcs/rfc6120.html#bind>
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
pub struct BindResponse { pub struct BindResponse {
/// The full JID returned by the server for this client. /// The full JID returned by the server for this client.

View file

@ -76,7 +76,7 @@ generate_element!(
/// registered types, but unregistered or yet-to-be-registered are /// registered types, but unregistered or yet-to-be-registered are
/// accepted too. /// accepted too.
/// ///
/// [1]: https://www.iana.org/assignments/media-types/media-types.xhtml /// [1]: <https://www.iana.org/assignments/media-types/media-types.xhtml>
type_: Option<String> = "type" type_: Option<String> = "type"
], ],
text: ( text: (

View file

@ -17,37 +17,37 @@ use std::str::FromStr;
pub enum Algo { pub enum Algo {
/// The Secure Hash Algorithm 1, with known vulnerabilities, do not use it. /// The Secure Hash Algorithm 1, with known vulnerabilities, do not use it.
/// ///
/// See https://tools.ietf.org/html/rfc3174 /// See <https://tools.ietf.org/html/rfc3174>
Sha_1, Sha_1,
/// The Secure Hash Algorithm 2, in its 256-bit version. /// The Secure Hash Algorithm 2, in its 256-bit version.
/// ///
/// See https://tools.ietf.org/html/rfc6234 /// See <https://tools.ietf.org/html/rfc6234>
Sha_256, Sha_256,
/// The Secure Hash Algorithm 2, in its 512-bit version. /// The Secure Hash Algorithm 2, in its 512-bit version.
/// ///
/// See https://tools.ietf.org/html/rfc6234 /// See <https://tools.ietf.org/html/rfc6234>
Sha_512, Sha_512,
/// The Secure Hash Algorithm 3, based on Keccak, in its 256-bit version. /// The Secure Hash Algorithm 3, based on Keccak, in its 256-bit version.
/// ///
/// See https://keccak.team/files/Keccak-submission-3.pdf /// See <https://keccak.team/files/Keccak-submission-3.pdf>
Sha3_256, Sha3_256,
/// The Secure Hash Algorithm 3, based on Keccak, in its 512-bit version. /// The Secure Hash Algorithm 3, based on Keccak, in its 512-bit version.
/// ///
/// See https://keccak.team/files/Keccak-submission-3.pdf /// See <https://keccak.team/files/Keccak-submission-3.pdf>
Sha3_512, Sha3_512,
/// The BLAKE2 hash algorithm, for a 256-bit output. /// The BLAKE2 hash algorithm, for a 256-bit output.
/// ///
/// See https://tools.ietf.org/html/rfc7693 /// See <https://tools.ietf.org/html/rfc7693>
Blake2b_256, Blake2b_256,
/// The BLAKE2 hash algorithm, for a 512-bit output. /// The BLAKE2 hash algorithm, for a 512-bit output.
/// ///
/// See https://tools.ietf.org/html/rfc7693 /// See <https://tools.ietf.org/html/rfc7693>
Blake2b_512, Blake2b_512,
/// An unknown hash not in this list, you can probably reject it. /// An unknown hash not in this list, you can probably reject it.
@ -109,7 +109,7 @@ generate_element!(
); );
impl Hash { impl Hash {
/// Creates a [Hash] element with the given algo and data. /// Creates a [struct@Hash] element with the given algo and data.
pub fn new(algo: Algo, hash: Vec<u8>) -> Hash { pub fn new(algo: Algo, hash: Vec<u8>) -> Hash {
Hash { algo, hash } Hash { algo, hash }
} }

View file

@ -103,7 +103,7 @@ generate_attribute!(
/// defined in RFC 2183 and applied to SIP by RFC 3261. /// defined in RFC 2183 and applied to SIP by RFC 3261.
/// ///
/// Possible values are defined here: /// Possible values are defined here:
/// https://www.iana.org/assignments/cont-disp/cont-disp.xhtml /// <https://www.iana.org/assignments/cont-disp/cont-disp.xhtml>
Disposition, "disposition", { Disposition, "disposition", {
/// Displayed automatically. /// Displayed automatically.
Inline => "inline", Inline => "inline",
@ -131,14 +131,14 @@ generate_attribute!(
RecipientListHistory => "recipient-list-history", RecipientListHistory => "recipient-list-history",
/// The body describes a communications session, for example, an /// The body describes a communications session, for example, an
/// RFC2327 SDP body. /// [RFC2327](https://tools.ietf.org/html/rfc2327) SDP body.
Session => "session", Session => "session",
/// Authenticated Identity Body. /// Authenticated Identity Body.
Aib => "aib", Aib => "aib",
/// The body describes an early communications session, for example, /// The body describes an early communications session, for example,
/// and [RFC2327] SDP body. /// and [RFC2327](https://tools.ietf.org/html/rfc2327) SDP body.
EarlySession => "early-session", EarlySession => "early-session",
/// The body includes a list of URIs to which URI-list services are to /// The body includes a list of URIs to which URI-list services are to
@ -347,7 +347,7 @@ impl Content {
pub enum Reason { pub enum Reason {
/// The party prefers to use an existing session with the peer rather than /// The party prefers to use an existing session with the peer rather than
/// initiate a new session; the Jingle session ID of the alternative /// initiate a new session; the Jingle session ID of the alternative
/// session SHOULD be provided as the XML character data of the <sid/> /// session SHOULD be provided as the XML character data of the \<sid/\>
/// child. /// child.
AlternativeSession, //(String), AlternativeSession, //(String),

View file

@ -27,7 +27,7 @@ generate_element!(
); );
impl Content { impl Content {
/// Creates a new <content/> element. /// Creates a new \<content/\> element.
pub fn new(name: &str) -> Content { pub fn new(name: &str) -> Content {
Content { Content {
name: ContentId(name.to_string()), name: ContentId(name.to_string()),

View file

@ -141,7 +141,7 @@ generate_element!(
Parameter, "parameter", JINGLE_RTP, Parameter, "parameter", JINGLE_RTP,
attributes: [ attributes: [
/// The name of the parameter, from the list at /// The name of the parameter, from the list at
/// https://www.iana.org/assignments/sdp-parameters/sdp-parameters.xhtml /// <https://www.iana.org/assignments/sdp-parameters/sdp-parameters.xhtml>
name: Required<String> = "name", name: Required<String> = "name",
/// The value of this parameter. /// The value of this parameter.

View file

@ -16,7 +16,7 @@ generate_element!(
/// registered types, but unregistered or yet-to-be-registered are /// registered types, but unregistered or yet-to-be-registered are
/// accepted too. /// accepted too.
/// ///
/// [1]: https://www.iana.org/assignments/media-types/media-types.xhtml /// [1]: <https://www.iana.org/assignments/media-types/media-types.xhtml>
type_: Required<String> = "type" type_: Required<String> = "type"
], ],
text: ( text: (

View file

@ -4,10 +4,10 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
/// The http://jabber.org/protocol/muc protocol. /// The `http://jabber.org/protocol/muc` protocol.
pub mod muc; pub mod muc;
/// The http://jabber.org/protocol/muc#user protocol. /// The `http://jabber.org/protocol/muc#user` protocol.
pub mod user; pub mod user;
pub use self::muc::Muc; pub use self::muc::Muc;

View file

@ -78,7 +78,7 @@ Status, "status", MUC_USER, "code", {
ServiceErrorKick => 333, ServiceErrorKick => 333,
}); });
/// Optional <actor/> element used in <item/> elements inside presence stanzas of type /// Optional \<actor/\> element used in \<item/\> elements inside presence stanzas of type
/// "unavailable" that are sent to users who are kick or banned, as well as within IQs for tracking /// "unavailable" that are sent to users who are kick or banned, as well as within IQs for tracking
/// purposes. -- CHANGELOG 0.17 (2002-10-23) /// purposes. -- CHANGELOG 0.17 (2002-10-23)
/// ///
@ -227,8 +227,8 @@ impl Item {
} }
/// Set a jid for this Item /// Set a jid for this Item
pub fn with_jid<J: Into<FullJid>>(mut self, jid: J) -> Item { pub fn with_jid(mut self, jid: FullJid) -> Item {
self.jid = Some(jid.into()); self.jid = Some(jid);
self self
} }

View file

@ -75,7 +75,8 @@ pub enum Type {
/// An error has occurred regarding processing of a previously sent /// An error has occurred regarding processing of a previously sent
/// presence stanza; if the presence stanza is of type "error", it MUST /// presence stanza; if the presence stanza is of type "error", it MUST
/// include an <error/> child element (refer to [XMPPCORE]). /// include an \<error/\> child element (refer to
/// [XMPPCORE](https://xmpp.org/rfcs/rfc6120.html)).
Error, Error,
/// A request for an entity's current presence; SHOULD be generated only by /// A request for an entity's current presence; SHOULD be generated only by

View file

@ -22,7 +22,7 @@ generate_attribute!(
/// client and the server to avoid having to store the password in /// client and the server to avoid having to store the password in
/// clear. /// clear.
/// ///
/// See https://tools.ietf.org/html/rfc5802 /// See <https://tools.ietf.org/html/rfc5802>
ScramSha1 => "SCRAM-SHA-1", ScramSha1 => "SCRAM-SHA-1",
/// Same as [ScramSha1](#structfield.ScramSha1), with the addition of /// Same as [ScramSha1](#structfield.ScramSha1), with the addition of

View file

@ -64,14 +64,14 @@ generate_element_enum!(
Forbidden => "forbidden", Forbidden => "forbidden",
/// The recipient or server can no longer be contacted at this address, /// The recipient or server can no longer be contacted at this address,
/// typically on a permanent basis (as opposed to the <redirect/> error /// typically on a permanent basis (as opposed to the \<redirect/\> error
/// condition, which is used for temporary addressing failures); the /// condition, which is used for temporary addressing failures); the
/// associated error type SHOULD be "cancel" and the error stanza /// associated error type SHOULD be "cancel" and the error stanza
/// SHOULD include a new address (if available) as the XML character /// SHOULD include a new address (if available) as the XML character
/// data of the <gone/> element (which MUST be a Uniform Resource /// data of the \<gone/\> element (which MUST be a Uniform Resource
/// Identifier [URI] or Internationalized Resource Identifier [IRI] at /// Identifier (URI) or Internationalized Resource Identifier (IRI) at
/// which the entity can be contacted, typically an XMPP IRI as /// which the entity can be contacted, typically an XMPP IRI as
/// specified in [XMPPURI]). /// specified in [XMPPURI](https://tools.ietf.org/html/rfc5122)).
Gone => "gone", Gone => "gone",
/// The server has experienced a misconfiguration or other internal /// The server has experienced a misconfiguration or other internal
@ -105,7 +105,7 @@ generate_element_enum!(
/// The sender needs to provide credentials before being allowed to /// The sender needs to provide credentials before being allowed to
/// perform the action, or has provided improper credentials (the name /// perform the action, or has provided improper credentials (the name
/// "not-authorized", which was borrowed from the "401 Unauthorized" /// "not-authorized", which was borrowed from the "401 Unauthorized"
/// error of [HTTP], might lead the reader to think that this condition /// error of HTTP, might lead the reader to think that this condition
/// relates to authorization, but instead it is typically used in /// relates to authorization, but instead it is typically used in
/// relation to authentication); the associated error type SHOULD be /// relation to authentication); the associated error type SHOULD be
/// "auth". /// "auth".
@ -113,7 +113,7 @@ generate_element_enum!(
/// The entity has violated some local service policy (e.g., a message /// The entity has violated some local service policy (e.g., a message
/// contains words that are prohibited by the service) and the server /// contains words that are prohibited by the service) and the server
/// MAY choose to specify the policy in the <text/> element or in an /// MAY choose to specify the policy in the \<text/\> element or in an
/// application-specific condition element; the associated error type /// application-specific condition element; the associated error type
/// SHOULD be "modify" or "wait" depending on the policy being /// SHOULD be "modify" or "wait" depending on the policy being
/// violated. /// violated.
@ -125,12 +125,12 @@ generate_element_enum!(
/// The recipient or server is redirecting requests for this /// The recipient or server is redirecting requests for this
/// information to another entity, typically in a temporary fashion (as /// information to another entity, typically in a temporary fashion (as
/// opposed to the <gone/> error condition, which is used for permanent /// opposed to the \<gone/\> error condition, which is used for permanent
/// addressing failures); the associated error type SHOULD be "modify" /// addressing failures); the associated error type SHOULD be "modify"
/// and the error stanza SHOULD contain the alternate address in the /// and the error stanza SHOULD contain the alternate address in the
/// XML character data of the <redirect/> element (which MUST be a URI /// XML character data of the \<redirect/\> element (which MUST be a URI
/// or IRI with which the sender can communicate, typically an XMPP IRI /// or IRI with which the sender can communicate, typically an XMPP IRI
/// as specified in [XMPPURI]). /// as specified in [XMPPURI](https://xmpp.org/rfcs/rfc5122.html)).
Redirect => "redirect", Redirect => "redirect",
/// The requesting entity is not authorized to access the requested /// The requesting entity is not authorized to access the requested