pub struct SingBoxClashApiClient { /* private fields */ }Expand description
The sing-box Clash API client.
Implementations§
Source§impl SingBoxClashApiClient
impl SingBoxClashApiClient
Sourcepub fn with_reqwest(
controller: SingBoxControllerConfiguration,
) -> Result<Self, PortError>
pub fn with_reqwest( controller: SingBoxControllerConfiguration, ) -> Result<Self, PortError>
Creates the client with the production HTTP boundary.
Fails with a Failed port error when the controller endpoint is not
an explicit HTTP loopback URL.
Sourcepub fn new(
controller: SingBoxControllerConfiguration,
http: Arc<dyn SingBoxClashHttpPort>,
) -> Result<Self, PortError>
pub fn new( controller: SingBoxControllerConfiguration, http: Arc<dyn SingBoxClashHttpPort>, ) -> Result<Self, PortError>
Creates the client with an injected HTTP boundary.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SingBoxClashApiClient
impl !UnwindSafe for SingBoxClashApiClient
impl Forget for SingBoxClashApiClient
impl Freeze for SingBoxClashApiClient
impl Move for SingBoxClashApiClient
impl Send for SingBoxClashApiClient
impl Sync for SingBoxClashApiClient
impl Unpin for SingBoxClashApiClient
impl UnsafeUnpin for SingBoxClashApiClient
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