pub enum AttachmentRequestId {
Upload(u32),
Existing(AttachmentId),
}Expand description
The id of an AttachmentRequest: the index n of a file uploaded as files[n], or
the ID of an existing attachment.
discord.js counterpart: the id of an attachment in RESTPostAPIChannelMessageJSONBody (discord-api-types).
Variants§
Upload(u32)
A new file, uploaded as files[n] in the same multipart request (written as a number).
Existing(AttachmentId)
An existing attachment (written as a snowflake string).
Trait Implementations§
Source§impl Clone for AttachmentRequestId
impl Clone for AttachmentRequestId
impl Copy for AttachmentRequestId
Source§impl Debug for AttachmentRequestId
impl Debug for AttachmentRequestId
Source§impl<'de> Deserialize<'de> for AttachmentRequestId
impl<'de> Deserialize<'de> for AttachmentRequestId
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Numbers that fit in a u32 are upload indices; strings and larger numbers are IDs.
impl Eq for AttachmentRequestId
Source§impl Hash for AttachmentRequestId
impl Hash for AttachmentRequestId
Source§impl PartialEq for AttachmentRequestId
impl PartialEq for AttachmentRequestId
Source§impl Serialize for AttachmentRequestId
impl Serialize for AttachmentRequestId
impl StructuralPartialEq for AttachmentRequestId
Auto Trait Implementations§
impl Freeze for AttachmentRequestId
impl RefUnwindSafe for AttachmentRequestId
impl Send for AttachmentRequestId
impl Sync for AttachmentRequestId
impl Unpin for AttachmentRequestId
impl UnsafeUnpin for AttachmentRequestId
impl UnwindSafe for AttachmentRequestId
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