pub struct Endpoint<'c, S: EndpointSpec> { /* private fields */ }Implementations§
Source§impl<'c, S: EndpointSpec> Endpoint<'c, S>
impl<'c, S: EndpointSpec> Endpoint<'c, S>
pub fn new(client: &'c TorboxClient) -> Self
pub fn new_with_url( client: &'c TorboxClient, full_url: impl Into<String>, ) -> Self
pub async fn call_no_body( &self, url_suffix: &str, ) -> Result<ApiResponse<S::Resp>, ApiError>
pub async fn call(&self, body: S::Req) -> Result<ApiResponse<S::Resp>, ApiError>
pub async fn call_query( &self, query: S::Req, ) -> Result<ApiResponse<S::Resp>, ApiError>
pub async fn call_multipart( &self, body: S::Req, ) -> Result<ApiResponse<S::Resp>, ApiError>
pub async fn call_query_bytes(&self, query: S::Req) -> Result<Vec<u8>, ApiError>
pub async fn call_query_raw<T>(&self, query: S::Req) -> Result<T, ApiError>
Auto Trait Implementations§
impl<'c, S> Freeze for Endpoint<'c, S>
impl<'c, S> !RefUnwindSafe for Endpoint<'c, S>
impl<'c, S> Send for Endpoint<'c, S>where
S: Send,
impl<'c, S> Sync for Endpoint<'c, S>where
S: Sync,
impl<'c, S> Unpin for Endpoint<'c, S>where
S: Unpin,
impl<'c, S> !UnwindSafe for Endpoint<'c, S>
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