docs: Reword docs for StringEnum

This commit is contained in:
Kévin Commaille 2022-05-30 17:11:47 +02:00 committed by Kévin Commaille
parent 240c8bc4b8
commit 0c67c6b3db
6 changed files with 6 additions and 6 deletions

View File

@ -1,5 +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
string with `::from()` / `.into()`. To check for values that are not available as a
documented variant here, use its string representation, obtained through
[`.as_str()`](Self::as_str()).

View File

@ -1,5 +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
string with `::from()` / `.into()`. To check for values that are not available as a
documented variant here, use its string representation, obtained through
[`.as_str()`](Self::as_str()).

View File

@ -71,7 +71,7 @@ impl SyncRoomJoinRulesEvent {
/// The rule used for users wishing to join this room.
///
/// This type can hold an arbitrary string. To check for formats that are not available as a
/// This type can hold an arbitrary string. To check for values that are not available as a
/// documented variant here, use its string representation, obtained through `.as_str()`.
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]

View File

@ -81,7 +81,7 @@ pub mod v1 {
/// Profile fields to specify in query.
///
/// 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
/// string with `::from() / .into()`. To check for values that are not available as a
/// documented variant here, use its string representation, obtained through
/// [`.as_str()`](Self::as_str()).
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]

View File

@ -11,7 +11,7 @@ pub mod lookup_3pid;
/// Matrix Spec.
///
/// 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
/// string with `::from() / .into()`. To check for values that are not available as a documented
/// variant here, use its string representation, obtained through [`.as_str()`](Self::as_str()).
#[derive(Debug, PartialEq, Eq, Clone, StringEnum)]
#[non_exhaustive]

View File

@ -146,7 +146,7 @@ pub mod v1 {
/// notifications in a way that will preserve battery power on mobile devices.
///
/// 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
/// string with `::from() / .into()`. To check for values that are not available as a
/// documented variant here, use its string representation, obtained through `.as_str()`.
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
#[ruma_enum(rename_all = "snake_case")]