pub struct HttpService { /* private fields */ }Implementations§
Source§impl HttpService
impl HttpService
pub fn new(url: impl IntoUrl, access_token: Option<String>) -> Result<Self>
pub async fn send_api_request( &self, client: &Client, api_request: &APIRequest, ) -> Result<Response>
pub async fn response_parser( &self, echo: Option<String>, response: Response, ) -> Result<DeserializedEvent>
Trait Implementations§
Source§impl Clone for HttpService
impl Clone for HttpService
Source§fn clone(&self) -> HttpService
fn clone(&self) -> HttpService
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CommunicationService for HttpService
impl CommunicationService for HttpService
Source§fn install(
&mut self,
api_receiver: InternalAPIReceiver,
event_sender: InternalEventSender,
)
fn install( &mut self, api_receiver: InternalAPIReceiver, event_sender: InternalEventSender, )
安装服务
该方法仅进行服务的依赖注入,并不真正创建任务
应具备幂等性
该方法仅进行服务的依赖注入,并不真正创建任务
应具备幂等性
Source§impl Debug for HttpService
impl Debug for HttpService
Auto Trait Implementations§
impl Freeze for HttpService
impl !RefUnwindSafe for HttpService
impl Send for HttpService
impl Sync for HttpService
impl Unpin for HttpService
impl UnsafeUnpin for HttpService
impl !UnwindSafe for HttpService
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