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
Bytes((&'a [u8], &'a str))
Indicates that the AttachmentType
is a byte slice with a filename.
File((&'a File, &'a str))
Indicates that the AttachmentType
is a File
Path(&'a Path)
Indicates that the AttachmentType
is a Path
Trait Implementations
impl<'a> From<(&'a [u8], &'a str)> for AttachmentType<'a>
[src]
impl<'a> From<&'a str> for AttachmentType<'a>
[src]
fn from(s: &'a str) -> AttachmentType
Performs the conversion.
impl<'a> From<&'a PathBuf> for AttachmentType<'a>
[src]
fn from(pathbuf: &'a PathBuf) -> AttachmentType
Performs the conversion.