Struct rest_api_utils::clients::RestApiClient [−][src]
pub struct RestApiClient<ApiErrorType> where
ApiErrorType: DeserializeOwned + ToString + Clone, { /* fields omitted */ }Implementations
impl<ApiErrorType> RestApiClient<ApiErrorType> where
ApiErrorType: DeserializeOwned + ToString + Clone,
impl<ApiErrorType> RestApiClient<ApiErrorType> where
ApiErrorType: DeserializeOwned + ToString + Clone,
pub async fn get<ResponseDataType>(
&self,
path: &str
) -> CrateResult<ResponseDataType> where
ResponseDataType: DeserializeOwned,
pub async fn post<RequestDataType, ResponseDataType>(
&self,
request_data: RequestDataType,
path: &str
) -> CrateResult<ResponseDataType> where
RequestDataType: Serialize,
ResponseDataType: DeserializeOwned,
Trait Implementations
impl<ApiErrorType: Clone> Clone for RestApiClient<ApiErrorType> where
ApiErrorType: DeserializeOwned + ToString + Clone,
impl<ApiErrorType: Clone> Clone for RestApiClient<ApiErrorType> where
ApiErrorType: DeserializeOwned + ToString + Clone,
Auto Trait Implementations
impl<ApiErrorType> !RefUnwindSafe for RestApiClient<ApiErrorType>
impl<ApiErrorType> Send for RestApiClient<ApiErrorType> where
ApiErrorType: Send,
impl<ApiErrorType> Sync for RestApiClient<ApiErrorType> where
ApiErrorType: Sync,
impl<ApiErrorType> Unpin for RestApiClient<ApiErrorType> where
ApiErrorType: Unpin,
impl<ApiErrorType> !UnwindSafe for RestApiClient<ApiErrorType>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more