📁
KSoft.rs
  • KSoft.rs
  • Shared types
  • Images
    • Types
    • Endpoints
  • Bans
    • Types
    • Endpoints
  • Kumo
    • Types
    • Endpoints
  • Music
    • Types
    • Endpoints
  • Events
    • Types
    • Examples
Powered by GitBook
On this page
  • HttpResult
  • ApiResponse
  • HttpError

Was this helpful?

Shared types

HttpResult

Result wrapper around most of endpoints. Not all endpoints return this

type HttpResult<S, E> = Result<ApiResponse<S, E>, HttpError>;

ApiResponse

Result renaming used to difference between an http error and an API error or unsuccessful response

type ApiResponse<S, E> = Result<S, E>

HttpError

Internal errors, if everything goes ok you never should see this errors

enum HttpError {
    RequestFailed(reqwest::Error),
    InternalServerError(String),
    RateLimited
}
PreviousKSoft.rsNextTypes

Last updated 4 years ago

Was this helpful?