Struct teloxide_core::requests::MultipartRequest
source · [−]pub struct MultipartRequest<P> { /* private fields */ }Expand description
A ready-to-send Telegram request whose payload is sent using multipart/form-data.
Implementations
sourceimpl<P> MultipartRequest<P>
impl<P> MultipartRequest<P>
Trait Implementations
sourceimpl<P: Clone> Clone for MultipartRequest<P>
impl<P: Clone> Clone for MultipartRequest<P>
sourcefn clone(&self) -> MultipartRequest<P>ⓘNotable traits for MultipartRequest<P>impl<P> Request for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload + Serialize,
P::Output: DeserializeOwned, type Err = RequestError; type Send = Send<P>; type SendRef = SendRef<P>;
fn clone(&self) -> MultipartRequest<P>ⓘNotable traits for MultipartRequest<P>impl<P> Request for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload + Serialize,
P::Output: DeserializeOwned, type Err = RequestError; type Send = Send<P>; type SendRef = SendRef<P>;
P: 'static,
P: Payload + MultipartPayload + Serialize,
P::Output: DeserializeOwned, type Err = RequestError; type Send = Send<P>; type SendRef = SendRef<P>;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<P> Deref for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload,
P::Output: DeserializeOwned,
impl<P> Deref for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload,
P::Output: DeserializeOwned,
sourceimpl<P> DerefMut for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload,
P::Output: DeserializeOwned,
impl<P> DerefMut for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload,
P::Output: DeserializeOwned,
sourceimpl<P> HasPayload for MultipartRequest<P>where
P: Payload,
impl<P> HasPayload for MultipartRequest<P>where
P: Payload,
type Payload = P
type Payload = P
The type of the payload contained.
sourcefn payload_mut(&mut self) -> &mut Self::Payload
fn payload_mut(&mut self) -> &mut Self::Payload
Gain mutable access to the underlying payload.
sourcefn payload_ref(&self) -> &Self::Payload
fn payload_ref(&self) -> &Self::Payload
Gain immutable access to the underlying payload.
sourcefn with_payload_mut<F>(self, f: F) -> Selfwhere
Self: Sized,
F: FnOnce(&mut Self::Payload),
fn with_payload_mut<F>(self, f: F) -> Selfwhere
Self: Sized,
F: FnOnce(&mut Self::Payload),
Update payload with a function
sourceimpl<P> IntoFuture for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload + Serialize,
P::Output: DeserializeOwned,
impl<P> IntoFuture for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload + Serialize,
P::Output: DeserializeOwned,
type Output = Result<<P as Payload>::Output, RequestError>
type Output = Result<<P as Payload>::Output, RequestError>
The output that the future will produce on completion.
type IntoFuture = Send<P>
type IntoFuture = Send<P>
Which kind of future are we turning this into?
sourcefn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
sourceimpl<P> Request for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload + Serialize,
P::Output: DeserializeOwned,
impl<P> Request for MultipartRequest<P>where
P: 'static,
P: Payload + MultipartPayload + Serialize,
P::Output: DeserializeOwned,
type Err = RequestError
type Err = RequestError
The type of an error that may happen while sending a request to
Telegram. Read more
sourcefn erase<'a>(self) -> ErasedRequest<'a, Self::Payload, Self::Err>ⓘNotable traits for ErasedRequest<'a, T, E>impl<'a, T, E> Request for ErasedRequest<'a, T, E>where
T: Payload,
E: Error + Send, type Err = E; type Send = BoxFuture<'a, Result<Output<Self>, Self::Err>>; type SendRef = BoxFuture<'a, Result<Output<Self>, Self::Err>>;where
Self: Sized + 'a,
fn erase<'a>(self) -> ErasedRequest<'a, Self::Payload, Self::Err>ⓘNotable traits for ErasedRequest<'a, T, E>impl<'a, T, E> Request for ErasedRequest<'a, T, E>where
T: Payload,
E: Error + Send, type Err = E; type Send = BoxFuture<'a, Result<Output<Self>, Self::Err>>; type SendRef = BoxFuture<'a, Result<Output<Self>, Self::Err>>;where
Self: Sized + 'a,
T: Payload,
E: Error + Send, type Err = E; type Send = BoxFuture<'a, Result<Output<Self>, Self::Err>>; type SendRef = BoxFuture<'a, Result<Output<Self>, Self::Err>>;
Available on crate feature
erased only.Auto Trait Implementations
impl<P> !RefUnwindSafe for MultipartRequest<P>
impl<P> Send for MultipartRequest<P>where
P: Send,
impl<P> Sync for MultipartRequest<P>where
P: Sync,
impl<P> Unpin for MultipartRequest<P>where
P: Unpin,
impl<P> !UnwindSafe for MultipartRequest<P>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
