doc: Use markdown doc for types deriving StringEnum
This commit is contained in:
parent
49663f4adf
commit
4d89c7cc08
@ -47,10 +47,7 @@ impl Default for EventFormat {
|
||||
}
|
||||
|
||||
/// Relation types as defined in `rel_type` of an `m.relates_to` field.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[cfg(feature = "unstable-msc3440")]
|
||||
#[non_exhaustive]
|
||||
|
@ -197,10 +197,7 @@ impl RuleKind {
|
||||
}
|
||||
|
||||
/// Which kind a pusher is.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[ruma_enum(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
|
@ -295,10 +295,7 @@ pub mod v3 {
|
||||
}
|
||||
|
||||
/// The keys to search for.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[non_exhaustive]
|
||||
pub enum SearchKeys {
|
||||
@ -326,10 +323,7 @@ pub mod v3 {
|
||||
}
|
||||
|
||||
/// The order in which to search for results.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||
#[ruma_enum(rename_all = "snake_case")]
|
||||
|
@ -41,10 +41,7 @@ impl HashAlgorithm {
|
||||
}
|
||||
|
||||
/// A key agreement protocol.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[ruma_enum(rename_all = "kebab-case")]
|
||||
#[non_exhaustive]
|
||||
@ -67,10 +64,7 @@ impl KeyAgreementProtocol {
|
||||
}
|
||||
|
||||
/// A message authentication code algorithm.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[ruma_enum(rename_all = "kebab-case")]
|
||||
#[non_exhaustive]
|
||||
@ -93,10 +87,7 @@ impl MessageAuthenticationCode {
|
||||
}
|
||||
|
||||
/// A Short Authentication String method.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[ruma_enum(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
@ -135,10 +126,7 @@ impl Relation {
|
||||
}
|
||||
|
||||
/// A Short Authentication String (SAS) verification method.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[non_exhaustive]
|
||||
pub enum VerificationMethod {
|
||||
|
@ -1492,10 +1492,7 @@ impl ServerNoticeType {
|
||||
}
|
||||
|
||||
/// Types of usage limits.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[ruma_enum(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
@ -1518,10 +1515,7 @@ impl LimitType {
|
||||
}
|
||||
|
||||
/// The format for the formatted representation of a message body.
|
||||
///
|
||||
/// 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()`.
|
||||
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/doc/string_enum.md"))]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||
#[non_exhaustive]
|
||||
pub enum MessageFormat {
|
||||
|
Loading…
x
Reference in New Issue
Block a user