pub struct UploadRequest {
pub peer: PeerRef,
pub kind: MediaKind,
pub file_name: Option<String>,
pub mime_type: Option<String>,
pub size_bytes: Option<u64>,
pub caption: Option<String>,
pub width: Option<u32>,
pub height: Option<u32>,
pub duration_ms: Option<u64>,
pub external_id: Option<ExternalId>,
pub random_id: Option<RandomId>,
pub reply_to_message_id: Option<InlineId>,
}Expand description
Request to upload and send media.
Raw bytes are intentionally passed as a separate argument to
crate::InlineClient::send_media so paths and transport-specific upload
bodies do not become part of the reusable request type.
Fields§
§peer: PeerRefTarget peer.
kind: MediaKindInline media kind requested by the host.
file_name: Option<String>Optional original file name.
mime_type: Option<String>Optional MIME type.
size_bytes: Option<u64>Optional content length in bytes.
caption: Option<String>Optional caption.
width: Option<u32>Optional media width in pixels.
height: Option<u32>Optional media height in pixels.
duration_ms: Option<u64>Optional media duration in milliseconds.
external_id: Option<ExternalId>Optional host-provided idempotency key.
random_id: Option<RandomId>Optional deterministic random ID supplied by the host.
reply_to_message_id: Option<InlineId>Optional reply target.
Trait Implementations§
Source§impl Clone for UploadRequest
impl Clone for UploadRequest
Source§fn clone(&self) -> UploadRequest
fn clone(&self) -> UploadRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UploadRequest
impl Debug for UploadRequest
Source§impl<'de> Deserialize<'de> for UploadRequest
impl<'de> Deserialize<'de> for UploadRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for UploadRequest
Source§impl PartialEq for UploadRequest
impl PartialEq for UploadRequest
Source§fn eq(&self, other: &UploadRequest) -> bool
fn eq(&self, other: &UploadRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UploadRequest
impl Serialize for UploadRequest
impl StructuralPartialEq for UploadRequest
Auto Trait Implementations§
impl Freeze for UploadRequest
impl RefUnwindSafe for UploadRequest
impl Send for UploadRequest
impl Sync for UploadRequest
impl Unpin for UploadRequest
impl UnsafeUnpin for UploadRequest
impl UnwindSafe for UploadRequest
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