pub enum Picture {
File(PathBuf),
Bytes {
name: String,
data: Vec<u8>,
},
Attachment(AttachmentId),
}Expand description
Where an embed’s picture (or a message’s file) comes from. Pictures are never remote URLs: a file is uploaded as one of the message’s attachments, so no reader’s client ever fetches anything from a third party.
Variants§
File(PathBuf)
A local file, uploaded under its own name.
Bytes
Bytes, uploaded under name (whose extension gives the media type).
Attachment(AttachmentId)
An attachment this member uploaded (and has not posted yet) or, for an edit, one the message already has.
Implementations§
Trait Implementations§
impl Eq for Picture
Source§impl From<&Attachment> for Picture
impl From<&Attachment> for Picture
Source§fn from(a: &Attachment) -> Self
fn from(a: &Attachment) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Picture
Auto Trait Implementations§
impl Freeze for Picture
impl RefUnwindSafe for Picture
impl Send for Picture
impl Sync for Picture
impl Unpin for Picture
impl UnsafeUnpin for Picture
impl UnwindSafe for Picture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CryptoSafe for T
impl<T> CryptoSafe for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more