pub struct ClientConfig {
pub server: String,
pub port: u16,
pub use_tls: bool,
pub timeout: Duration,
pub retry_count: u32,
pub retry_delay: Duration,
pub skip_tls_verify: bool,
}Expand description
Configuration for Electrum client.
Fields§
§server: StringServer hostname or IP
port: u16Server port
use_tls: boolUse TLS/SSL connection
timeout: DurationConnection timeout
retry_count: u32Number of retry attempts
retry_delay: DurationDelay between retries
skip_tls_verify: boolSkip TLS certificate validation (INSECURE - for testing only)
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn ssl(server: impl Into<String>) -> Self
pub fn ssl(server: impl Into<String>) -> Self
Create config for SSL/TLS connection (port 50002).
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set connection timeout.
Sourcepub fn with_retry(self, count: u32, delay: Duration) -> Self
pub fn with_retry(self, count: u32, delay: Duration) -> Self
Set retry configuration.
Sourcepub fn with_skip_tls_verify(self) -> Self
pub fn with_skip_tls_verify(self) -> Self
Skip TLS certificate validation (INSECURE - for testing only).
§Warning
This disables certificate validation and should only be used for testing with self-signed certificates. Never use in production!
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
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 ClientConfig
impl Debug for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
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