titanium_model/file.rs
1/// A file to be uploaded to Discord.
2#[derive(Debug, Clone)]
3pub struct FileUpload {
4 /// The name of the file.
5 pub filename: String,
6 /// The binary data of the file.
7 pub data: Vec<u8>,
8}
9
10impl FileUpload {
11 /// Create a new FileUpload.
12 pub fn new(filename: impl Into<String>, data: impl Into<Vec<u8>>) -> Self {
13 Self {
14 filename: filename.into(),
15 data: data.into(),
16 }
17 }
18}