Enum serenity::http::AttachmentType [] [src]

pub enum AttachmentType<'a> {
    Bytes((&'a [u8], &'a str)),
    File((&'a File, &'a str)),
    Path(&'a Path),
}

Enum that allows a user to pass a Path or a File type to send_files

Variants

Indicates that the AttachmentType is a byte slice with a filename.

Indicates that the AttachmentType is a File

Indicates that the AttachmentType is a Path

Trait Implementations

impl<'a> From<(&'a [u8], &'a str)> for AttachmentType<'a>
[src]

Performs the conversion.

impl<'a> From<&'a str> for AttachmentType<'a>
[src]

Performs the conversion.

impl<'a> From<&'a PathBuf> for AttachmentType<'a>
[src]

Performs the conversion.

impl<'a> From<(&'a File, &'a str)> for AttachmentType<'a>
[src]

Performs the conversion.