doc: Add doc link to as_str implementations

This commit is contained in:
Kévin Commaille 2022-05-30 15:17:40 +02:00 committed by Kévin Commaille
parent 4d89c7cc08
commit 7f164b3173
4 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,5 @@
<!-- Keep this comment so the content is always included as a new paragraph -->
This type can hold an arbitrary string. To build this with a custom value, convert it from a
string with `::from()` / `.into()`. To check for formats that are not available as a
documented variant here, use its string representation, obtained through `.as_str()`.
documented variant here, use its string representation, obtained through
[`.as_str()`](Self::as_str()).

View File

@ -1,4 +1,5 @@
<!-- Keep this comment so the content is always included as a new paragraph -->
This type can hold an arbitrary string. To build this with a custom value, convert it from a
string with `::from()` / `.into()`. To check for formats that are not available as a
documented variant here, use its string representation, obtained through `.as_str()`.
documented variant here, use its string representation, obtained through
[`.as_str()`](Self::as_str()).

View File

@ -82,7 +82,8 @@ pub mod v1 {
///
/// This type can hold an arbitrary string. To build this with a custom value, convert it from a
/// string with `::from() / .into()`. To check for formats that are not available as a
/// documented variant here, use its string representation, obtained through `.as_str()`.
/// documented variant here, use its string representation, obtained through
/// [`.as_str()`](Self::as_str()).
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
#[non_exhaustive]
pub enum ProfileField {

View File

@ -12,7 +12,7 @@ pub mod lookup_3pid;
///
/// This type can hold an arbitrary string. To build this with a custom value, convert it from a
/// string with `::from() / .into()`. To check for formats that are not available as a documented
/// variant here, use its string representation, obtained through `.as_str()`.
/// variant here, use its string representation, obtained through [`.as_str()`](Self::as_str()).
#[derive(Debug, PartialEq, Eq, Clone, StringEnum)]
#[non_exhaustive]
#[ruma_enum(rename_all = "snake_case")]