[−][src]Struct misskey_http::HttpClient
Asynchronous HTTP-based client for Misskey.
HttpClient
can be constructed using HttpClient::new
, HttpClient::with_token
or
HttpClientBuilder
.
Implementations
impl HttpClient
[src]
pub fn new(url: Url) -> Result<Self, Error>
[src]
Creates a new HTTP-based client without a token.
pub fn with_token(url: Url, token: impl Into<String>) -> Result<Self, Error>
[src]
Creates a new HTTP-based client with a token.
pub fn builder<T>(url: T) -> HttpClientBuilder where
T: TryInto<Url>,
T::Error: Into<Error>,
[src]
T: TryInto<Url>,
T::Error: Into<Error>,
Creates a new builder instance with url
.
All configurations are set to default.
This function is identical to HttpClientBuilder::new
.
Trait Implementations
impl Client for HttpClient
[src]
type Error = Error
The error type produced by the client when an error occurs.
pub fn request<R: Request>(
&self,
request: R
) -> BoxFuture<'_, Result<ApiResult<R::Response>, Error>>
[src]
&self,
request: R
) -> BoxFuture<'_, Result<ApiResult<R::Response>, Error>>
impl Debug for HttpClient
[src]
impl UploadFileClient for HttpClient
[src]
Auto Trait Implementations
impl !RefUnwindSafe for HttpClient
[src]
impl Send for HttpClient
[src]
impl Sync for HttpClient
[src]
impl Unpin for HttpClient
[src]
impl !UnwindSafe for HttpClient
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,