pub struct HostNetworkConfig {
pub api_base_url: String,
pub default_api_base_url: String,
pub ws_url: String,
pub timeout: Duration,
pub user_agent: Option<String>,
}Expand description
Platform-provided network initialization material.
Fields§
§api_base_url: StringGo IM base URL(例如 /api/cses 网关)。
default_api_base_url: String前端/平台显式提供的 Java 默认业务网关 base URL;空串表示未注入。
不允许从 api_base_url 裁路径或拼域名推测,两者可以是完全不同的 origin。
ws_url: String§timeout: Duration§user_agent: Option<String>Implementations§
Source§impl HostNetworkConfig
impl HostNetworkConfig
pub fn new( api_base_url: impl Into<String>, ws_url: impl Into<String>, ) -> HostNetworkConfig
pub fn with_timeout(self, timeout: Duration) -> HostNetworkConfig
pub fn with_user_agent(self, user_agent: impl Into<String>) -> HostNetworkConfig
Sourcepub fn with_default_api_base_url(
self,
api_base_url: impl Into<String>,
) -> HostNetworkConfig
pub fn with_default_api_base_url( self, api_base_url: impl Into<String>, ) -> HostNetworkConfig
显式注入 Java/default business gateway;不会从 Go base 派生。
Trait Implementations§
Source§impl Clone for HostNetworkConfig
impl Clone for HostNetworkConfig
Source§fn clone(&self) -> HostNetworkConfig
fn clone(&self) -> HostNetworkConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HostNetworkConfig
impl RefUnwindSafe for HostNetworkConfig
impl Send for HostNetworkConfig
impl Sync for HostNetworkConfig
impl Unpin for HostNetworkConfig
impl UnsafeUnpin for HostNetworkConfig
impl UnwindSafe for HostNetworkConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request