pub struct NtripConfig {
pub host: String,
pub port: u16,
pub mountpoint: String,
pub username: Option<String>,
pub password: Option<String>,
pub use_tls: bool,
pub tls_skip_verify: bool,
pub ntrip_version: NtripVersion,
pub connection: ConnectionConfig,
}Expand description
Configuration for an NTRIP client connection.
Fields§
§host: StringCaster hostname or IP address.
port: u16Caster port (typically 2101).
mountpoint: StringMountpoint name.
username: Option<String>Username for authentication.
password: Option<String>Password for authentication.
use_tls: boolUse HTTPS/TLS.
tls_skip_verify: boolSkip TLS certificate verification (insecure, for testing only).
ntrip_version: NtripVersionNTRIP protocol version.
connection: ConnectionConfigConnection configuration.
Implementations§
Source§impl NtripConfig
impl NtripConfig
Sourcepub fn new(
host: impl Into<String>,
port: u16,
mountpoint: impl Into<String>,
) -> Self
pub fn new( host: impl Into<String>, port: u16, mountpoint: impl Into<String>, ) -> Self
Create a new configuration with required fields.
Sourcepub fn with_credentials(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn with_credentials( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Set credentials for authentication.
Sourcepub fn with_tls_skip_verify(self) -> Self
pub fn with_tls_skip_verify(self) -> Self
Skip TLS certificate verification (insecure).
Sourcepub fn with_version(self, version: NtripVersion) -> Self
pub fn with_version(self, version: NtripVersion) -> Self
Set NTRIP protocol version.
Sourcepub fn with_timeout(self, timeout_secs: u32) -> Self
pub fn with_timeout(self, timeout_secs: u32) -> Self
Set connection timeout.
Sourcepub fn with_read_timeout(self, read_timeout_secs: u32) -> Self
pub fn with_read_timeout(self, read_timeout_secs: u32) -> Self
Set read timeout.
Sourcepub fn with_reconnect(self, max_attempts: u32, delay_ms: u64) -> Self
pub fn with_reconnect(self, max_attempts: u32, delay_ms: u64) -> Self
Set maximum reconnection attempts (0 = disabled).
Sourcepub fn without_reconnect(self) -> Self
pub fn without_reconnect(self) -> Self
Disable automatic reconnection.
Trait Implementations§
Source§impl Clone for NtripConfig
impl Clone for NtripConfig
Source§fn clone(&self) -> NtripConfig
fn clone(&self) -> NtripConfig
Returns a duplicate of the value. Read more
1.0.0§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 NtripConfig
impl RefUnwindSafe for NtripConfig
impl Send for NtripConfig
impl Sync for NtripConfig
impl Unpin for NtripConfig
impl UnwindSafe for NtripConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)