Enum Picture
zaun_client::Picture · Enum
pub enum Picture { … }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
Section titled “Variants”File(PathBuf)
Section titled “File(PathBuf)”A local file, uploaded under its own name.
Bytes { name, data }
Section titled “Bytes { name, data }”Bytes, uploaded under name (whose extension gives the media type).
Attachment(AttachmentId)
Section titled “Attachment(AttachmentId)”An attachment this member uploaded (and has not posted yet) or, for an edit, one the message already has.
Methods
Section titled “Methods”pub fn file<impl Into<PathBuf>>(path: impl Into<PathBuf>) -> SelfThe file at path.
pub fn bytes<impl Into<String>, impl Into<Vec<u8>>>(name: impl Into<String>, data: impl Into<Vec<u8>>) -> Selfdata, uploaded as a file named name.
attachment
Section titled “attachment”pub const fn attachment(id: AttachmentId) -> SelfThe attachment id.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Eq, From<&Attachment>, From<&Path>, From<AttachmentId>, From<PathBuf>, PartialEq, StructuralPartialEq