pub struct AttachmentConfig { /* private fields */ }Expand description
Configuration for sending an attachment.
Implementations§
Source§impl AttachmentConfig
impl AttachmentConfig
Sourcepub fn thumbnail(self, thumbnail: Option<Thumbnail>) -> Self
pub fn thumbnail(self, thumbnail: Option<Thumbnail>) -> Self
Set the thumbnail to send.
§Arguments
thumbnail- The thumbnail of the media. If thecontent_typedoes not support it (e.g. audio clips), it is ignored.
Sourcepub fn txn_id(self, txn_id: &TransactionId) -> Self
pub fn txn_id(self, txn_id: &TransactionId) -> Self
Set the transaction ID to send.
§Arguments
txn_id- A unique ID that can be attached to aMessageEventheld in its unsigned field astransaction_id. If not given, one is created for the message.
Sourcepub fn info(self, info: AttachmentInfo) -> Self
pub fn info(self, info: AttachmentInfo) -> Self
Set the media metadata to send.
§Arguments
info- The metadata of the media. If theAttachmentInfotype doesn’t match thecontent_type, it is ignored.
Sourcepub fn formatted_caption(self, formatted_caption: Option<FormattedBody>) -> Self
pub fn formatted_caption(self, formatted_caption: Option<FormattedBody>) -> Self
Trait Implementations§
Source§impl Debug for AttachmentConfig
impl Debug for AttachmentConfig
Source§impl Default for AttachmentConfig
impl Default for AttachmentConfig
Source§fn default() -> AttachmentConfig
fn default() -> AttachmentConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AttachmentConfig
impl RefUnwindSafe for AttachmentConfig
impl Send for AttachmentConfig
impl Sync for AttachmentConfig
impl Unpin for AttachmentConfig
impl UnwindSafe for AttachmentConfig
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
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more