pub struct ClientOptions {
pub url: Option<String>,
pub host: Option<String>,
pub use_tls: Option<bool>,
pub transport: Option<TransportType>,
pub default_timeout_ms: Option<u64>,
}Expand description
Client configuration options.
Transport is auto-detected from URL scheme when using url:
grpc://orgrpcs://→ gRPC transportws://,wss://,http://,https://→ WebSocket transport
§Examples
ⓘ
// Auto-detect transport from URL (recommended)
ClientOptions {
url: Some("grpcs://connectors.example.com:443".to_string()),
..Default::default()
}
// WebSocket transport (auto-detected from wss://)
ClientOptions {
url: Some("wss://connectors.example.com:443".to_string()),
..Default::default()
}
// Legacy: explicit host
ClientOptions {
host: Some("connectors.example.com:443".to_string()),
use_tls: Some(true),
..Default::default()
}Fields§
§url: Option<String>Strike48 server URL with scheme (preferred, auto-detects transport).
Examples:
grpcs://matrix.example.com:443- gRPC with TLSwss://matrix.example.com:443- WebSocket with TLS
host: Option<String>👎Deprecated:
Use url with scheme for auto-detection
Strike48 server host (legacy, use url instead).
use_tls: Option<bool>Use TLS for connection (auto-detected from URL scheme when using url).
transport: Option<TransportType>👎Deprecated:
Use url with scheme for auto-detection
Transport type (auto-detected from URL scheme when using url).
default_timeout_ms: Option<u64>Default timeout for operations in milliseconds (default: 30000).
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Source§fn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientOptions
impl Debug for ClientOptions
Source§impl Default for ClientOptions
impl Default for ClientOptions
Source§fn default() -> ClientOptions
fn default() -> ClientOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientOptions
impl RefUnwindSafe for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl UnsafeUnpin for ClientOptions
impl UnwindSafe for ClientOptions
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
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> 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