pub trait SingBoxClashHttpPort: Send + Sync {
// Required method
fn request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 Url,
method: SingBoxClashMethod,
authorization: &'life2 SingBoxControllerAuthorization,
body: Option<Vec<u8>>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<SingBoxClashResponse, PortError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
The injectable HTTP boundary of the sing-box Clash API client.
Required Methods§
Sourcefn request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 Url,
method: SingBoxClashMethod,
authorization: &'life2 SingBoxControllerAuthorization,
body: Option<Vec<u8>>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<SingBoxClashResponse, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 Url,
method: SingBoxClashMethod,
authorization: &'life2 SingBoxControllerAuthorization,
body: Option<Vec<u8>>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<SingBoxClashResponse, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Performs one request against the loopback controller.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".