pub struct Client { /* private fields */ }Expand description
A cheap-to-clone, concurrency-safe client for a 3x-ui panel.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(base_url: impl AsRef<str>) -> Result<Self>
pub fn new(base_url: impl AsRef<str>) -> Result<Self>
Creates a cookie-session client with default settings.
§Errors
Returns Error::Configuration when the base URL or HTTP client
configuration is invalid.
Sourcepub fn builder(base_url: impl AsRef<str>) -> Result<ClientBuilder>
pub fn builder(base_url: impl AsRef<str>) -> Result<ClientBuilder>
Starts configuring a client.
§Errors
Returns Error::Configuration when base_url is not an HTTP(S) URL.
Sourcepub fn authentication_kind(&self) -> AuthenticationKind
pub fn authentication_kind(&self) -> AuthenticationKind
Returns the authentication mechanism for protected panel endpoints.
Sourcepub fn response_body_limit(&self) -> usize
pub fn response_body_limit(&self) -> usize
Returns the configured maximum ordinary API response body size.
Sourcepub fn download_body_limit(&self) -> usize
pub fn download_body_limit(&self) -> usize
Returns the configured maximum database/migration download size.
Sourcepub const fn inbounds(&self) -> InboundsApi<'_>
pub const fn inbounds(&self) -> InboundsApi<'_>
Accesses inbound management operations.
Sourcepub const fn clients(&self) -> ClientsApi<'_>
pub const fn clients(&self) -> ClientsApi<'_>
Accesses client and client-group management operations.
Sourcepub const fn server(&self) -> ServerApi<'_>
pub const fn server(&self) -> ServerApi<'_>
Accesses server status, Xray lifecycle, maintenance, and utility operations.
Sourcepub const fn settings(&self) -> SettingsApi<'_>
pub const fn settings(&self) -> SettingsApi<'_>
Accesses panel settings, credentials, notifications, and API tokens.
Sourcepub const fn xray_settings(&self) -> XraySettingsApi<'_>
pub const fn xray_settings(&self) -> XraySettingsApi<'_>
Accesses Xray settings, integrations, tests, and outbound subscriptions.
Sourcepub const fn hosts(&self) -> HostsApi<'_>
pub const fn hosts(&self) -> HostsApi<'_>
Accesses per-inbound subscription host override operations.
Sourcepub const fn nodes(&self) -> NodesApi<'_>
pub const fn nodes(&self) -> NodesApi<'_>
Accesses remote node registration, health, discovery, and mTLS operations.
Sourcepub const fn subscription_balancers(&self) -> SubscriptionBalancersApi<'_>
pub const fn subscription_balancers(&self) -> SubscriptionBalancersApi<'_>
Accesses JSON-subscription balancer management operations.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more