Struct carapax::types::InputMedia
source · pub struct InputMedia { /* private fields */ }
Expand description
Represents a content of a media message to be sent.
Implementations§
source§impl InputMedia
impl InputMedia
sourcepub fn new<A, B>(file: A, media_type: B) -> Result<InputMedia, InputMediaError>
pub fn new<A, B>(file: A, media_type: B) -> Result<InputMedia, InputMediaError>
sourcepub fn with_thumbnail<A, B, C>(
file: A,
media_type: B,
thumbnail: C
) -> Result<InputMedia, InputMediaError>
pub fn with_thumbnail<A, B, C>( file: A, media_type: B, thumbnail: C ) -> Result<InputMedia, InputMediaError>
Creates a new InputMedia
with a thumbnail.
§Arguments
file
- File to send.media_type
- Metadata of the media.thumbnail
- Thumbnail file.
Note that photo can not have a thumbnail.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputMedia
impl !RefUnwindSafe for InputMedia
impl Send for InputMedia
impl Sync for InputMedia
impl Unpin for InputMedia
impl !UnwindSafe for InputMedia
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> 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