Function twilight_validate::message::attachment_filename

source ·
pub fn attachment_filename(
    filename: impl AsRef<str>
) -> Result<(), MessageValidationError>
Expand description

Ensure an attachment’s description is correct.

The filename can contain ASCII alphanumeric characters, dots, dashes, and underscores.

§Errors

Returns an error of type AttachmentFilename if the filename is invalid.