pub fn content(value: impl AsRef<str>) -> Result<(), MessageValidationError> {
    // <https://discordapp.com/developers/docs/resources/channel#create-message-params>
    if value.as_ref().chars().count() <= MESSAGE_CONTENT_LENGTH_MAX {
        Ok(())
    } else {
        Err(MessageValidationError {
            kind: MessageValidationErrorType::ContentInvalid,
            source: None,
        })
    }
}
/// Ensure a message's content is correct.
///
/// # Errors
///
/// Returns an error of type [`ContentInvalid`] if the message's content is
/// invalid.
///
/// [`ContentInvalid`]: MessageValidationErrorType::ContentInvalid
Ensure a message's content is correct.
Ensure a message ' s content is correct .
pub fn content(value: impl AsRef<str>) -> Result<(), MessageValidationError> {
    // <https://discordapp.com/developers/docs/resources/channel#create-message-params>
    if value.as_ref().chars().count() <= MESSAGE_CONTENT_LENGTH_MAX {
        Ok(())
    } else {
        Err(MessageValidationError {
            kind: MessageValidationErrorType::ContentInvalid,
            source: None,
        })
    }
}
pub fn content ( value : impl AsRef < str > ) -> Result < ( ) , MessageValidationError > { // <https://discordapp.com/developers/docs/resources/channel#create-message-params> if value . as_ref ( ) . chars ( ) . count ( ) <= MESSAGE_CONTENT_LENGTH_MAX { Ok ( ( ) ) } else { Err ( MessageValidationError { kind : MessageValidationErrorType :: ContentInvalid , source : None , } ) } }
Ensure a message's content is correct.
Ensure a message ' s content is correct .
value
impl AsRef<str>
errors
Returns an error of type [`ContentInvalid`] if the message's content is
invalid.

[`ContentInvalid`]: MessageValidationErrorType::ContentInvalid
Returns an error of type [ ` ContentInvalid ` ] if the message ' s content is invalid . [ ` ContentInvalid ` ] : MessageValidationErrorType :: ContentInvalid