pub struct Request<'a> {
pub request_type: RequestType<'a>,
pub endpoint: Cow<'static, str>,
}
Expand description
Struct representing a batched request, taking the request type and endpoint
Fields§
§request_type: RequestType<'a>
§endpoint: Cow<'static, str>
Implementations§
Source§impl<'a> Request<'a>
impl<'a> Request<'a>
Sourcepub fn new(
request_type: RequestType<'a>,
endpoint: impl Into<Cow<'static, str>>,
) -> Self
pub fn new( request_type: RequestType<'a>, endpoint: impl Into<Cow<'static, str>>, ) -> Self
Creates a new batched request, which can be wrapped in a slice and send to the LCU
pub fn delete(endpoint: impl Into<Cow<'static, str>>) -> Self
pub fn get(endpoint: impl Into<Cow<'static, str>>) -> Self
pub fn patch( endpoint: impl Into<Cow<'static, str>>, body: Option<&'a dyn Serialize>, ) -> Self
pub fn put( endpoint: impl Into<Cow<'static, str>>, body: Option<&'a dyn Serialize>, ) -> Self
pub fn post( endpoint: impl Into<Cow<'static, str>>, body: Option<&'a dyn Serialize>, ) -> Self
Auto Trait Implementations§
impl<'a> Freeze for Request<'a>
impl<'a> !RefUnwindSafe for Request<'a>
impl<'a> !Send for Request<'a>
impl<'a> !Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> !UnwindSafe for Request<'a>
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