pub struct HttpCapability { /* private fields */ }Expand description
HTTP 客户端能力
实现 Capability trait,可被 UniStore 运行时管理
Implementations§
Source§impl HttpCapability
impl HttpCapability
Sourcepub fn with_config(config: HttpClientConfig) -> Self
pub fn with_config(config: HttpClientConfig) -> Self
使用自定义配置创建
Sourcepub fn client(&self) -> Option<&HttpClient>
pub fn client(&self) -> Option<&HttpClient>
获取客户端(能力必须已启动)
Trait Implementations§
Source§impl Capability for HttpCapability
impl Capability for HttpCapability
Source§fn info(&self) -> CapabilityInfo
fn info(&self) -> CapabilityInfo
获取能力的元数据信息 Read more
Source§fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
启动能力 Read more
Source§fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
停止能力 Read more
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CapabilityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
健康检查 Read more
Source§fn supports_hot_reload(&self) -> bool
fn supports_hot_reload(&self) -> bool
能力是否支持热重载 Read more
Auto Trait Implementations§
impl Freeze for HttpCapability
impl !RefUnwindSafe for HttpCapability
impl Send for HttpCapability
impl Sync for HttpCapability
impl Unpin for HttpCapability
impl !UnwindSafe for HttpCapability
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