pub struct LemmyRequest<Body>where
Body: LemmyForm,{
pub body: Body,
pub jwt: Option<String>,
}
Expand description
A request to send to lemmy. If you don’t want to set the JWT for each request, you can set the Authorization header with LemmyClient::headers_mut
.
Fields§
§body: Body
The body to send with the request. Uses unit
for when a body is not required.
jwt: Option<String>
The JWT that is used when authorization is required.
Implementations§
Trait Implementations§
Source§impl<Body> Clone for LemmyRequest<Body>where
Body: LemmyForm + Clone,
impl<Body> Clone for LemmyRequest<Body>where
Body: LemmyForm + Clone,
Source§fn clone(&self) -> LemmyRequest<Body>
fn clone(&self) -> LemmyRequest<Body>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Body> Debug for LemmyRequest<Body>where
Body: LemmyForm + Debug,
impl<Body> Debug for LemmyRequest<Body>where
Body: LemmyForm + Debug,
Auto Trait Implementations§
impl<Body> Freeze for LemmyRequest<Body>where
Body: Freeze,
impl<Body> RefUnwindSafe for LemmyRequest<Body>where
Body: RefUnwindSafe,
impl<Body> Send for LemmyRequest<Body>where
Body: Send,
impl<Body> Sync for LemmyRequest<Body>where
Body: Sync,
impl<Body> Unpin for LemmyRequest<Body>where
Body: Unpin,
impl<Body> UnwindSafe for LemmyRequest<Body>where
Body: UnwindSafe,
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