Fix some docstrings.
This commit is contained in:
parent
9055983642
commit
c357991bbd
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
authors = ["Jimmy Cuadra <jimmy@jimmycuadra.com>"]
|
authors = ["Jimmy Cuadra <jimmy@jimmycuadra.com>"]
|
||||||
description = "Opaque identifiers for Matrix."
|
description = "Resource identifiers for Matrix."
|
||||||
documentation = "http://ruma.github.io/ruma-identifiers/ruma_identifiers"
|
documentation = "http://ruma.github.io/ruma-identifiers/ruma_identifiers"
|
||||||
homepage = "https://github.com/ruma/ruma-identifiers"
|
homepage = "https://github.com/ruma/ruma-identifiers"
|
||||||
keywords = ["matrix", "matrix.org", "chat", "messaging", "ruma"]
|
keywords = ["matrix", "matrix.org", "chat", "messaging", "ruma"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# ruma-identifiers
|
# ruma-identifiers
|
||||||
|
|
||||||
**ruma-identifiers** contains types for [Matrix](https://matrix.org/) opaque identifiers, such as user IDs, room IDs, and room aliases.
|
**ruma-identifiers** contains types for [Matrix](https://matrix.org/) identifiers for events, rooms, room aliases, and users.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
10
src/lib.rs
10
src/lib.rs
@ -1,5 +1,5 @@
|
|||||||
//! Crate **ruma_identifiers** contains types for [Matrix](https://matrix.org/) opaque identifiers,
|
//! Crate **ruma_identifiers** contains types for [Matrix](https://matrix.org/) identifiers
|
||||||
//! such as user IDs, room IDs, and room aliases.
|
//! for events, rooms, room aliases, and users.
|
||||||
|
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
@ -28,12 +28,14 @@ lazy_static! {
|
|||||||
Regex::new(r"\A[a-z0-9._=-]+\z").expect("Failed to create user localpart regex.");
|
Regex::new(r"\A[a-z0-9._=-]+\z").expect("Failed to create user localpart regex.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An error encountered when trying to parse an invalid user ID string.
|
/// An error encountered when trying to parse an invalid ID string.
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// The ID's localpart contains invalid characters.
|
/// The ID's localpart contains invalid characters.
|
||||||
|
///
|
||||||
|
/// Only relevant for user IDs.
|
||||||
InvalidCharacters,
|
InvalidCharacters,
|
||||||
/// The domain part of the user ID string was not a valid IP address or DNS name.
|
/// The domain part of the the ID string is not a valid IP address or DNS name.
|
||||||
InvalidHost,
|
InvalidHost,
|
||||||
/// The ID exceeds 255 bytes.
|
/// The ID exceeds 255 bytes.
|
||||||
MaximumLengthExceeded,
|
MaximumLengthExceeded,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user