pub struct ClientOptions {
pub endpoint: String,
pub headers: Option<HashMap<String, String>>,
}Expand description
Configuration options for the TRP client.
This structure holds the configuration needed to create a TRP client, including the endpoint URL and optional custom headers.
§Example
ⓘ
use tx3_sdk::trp::ClientOptions;
use std::collections::HashMap;
let mut headers = HashMap::new();
headers.insert("Authorization".to_string(), "Bearer token123".to_string());
let options = ClientOptions {
endpoint: "https://trp.example.com".to_string(),
headers: Some(headers),
};Fields§
§endpoint: StringThe TRP server endpoint URL.
headers: Option<HashMap<String, String>>Optional custom HTTP headers to include in requests.
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 moreAuto 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