pub struct NtripConfig {
pub host: String,
pub port: u16,
pub use_tls: bool,
}
Expand description
NTRIP (Networked Transport of RTCM via Internet Protocol) configuration
Fields§
§host: String
Host name or IP address of the NTRIP server
port: u16
Port number of the NTRIP server
use_tls: bool
Use TLS / SSL for the NTRIP connection
Implementations§
Source§impl NtripConfig
impl NtripConfig
Sourcepub fn from_provider(network: RtcmProvider) -> Self
pub fn from_provider(network: RtcmProvider) -> Self
Prepares an NtripConfig for one of our predefined RtcmProviders
Sourcepub fn with_host(&self, address: &str) -> Self
pub fn with_host(&self, address: &str) -> Self
Copies and returns NtripConfig with updated “host” IP address
Sourcepub fn with_port(&self, port: u16) -> Self
pub fn with_port(&self, port: u16) -> Self
Copies and returns NtripConfig with updated port number
Sourcepub fn with_tls(&self) -> Self
pub fn with_tls(&self) -> Self
Copies and returns NtripConfig with TLS/SSL active
Sourcepub fn without_tls(&self) -> Self
pub fn without_tls(&self) -> Self
Copies and returns NtripConfig without TLS/SSL active
Trait Implementations§
Source§impl Args for NtripConfig
impl Args for NtripConfig
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl CommandFactory for NtripConfig
impl CommandFactory for NtripConfig
Source§impl Debug for NtripConfig
impl Debug for NtripConfig
Source§impl Default for NtripConfig
impl Default for NtripConfig
Source§fn default() -> Self
fn default() -> Self
Builds a default NtripConfig ready to connect to RtcmProvider::Centipede network. The network does not requires SSL.
Source§impl<'de> Deserialize<'de> for NtripConfig
impl<'de> Deserialize<'de> for NtripConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromArgMatches for NtripConfig
impl FromArgMatches for NtripConfig
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§impl FromStr for NtripConfig
Parse an NtripConfig from a URL string
impl FromStr for NtripConfig
Parse an NtripConfig from a URL string
For example:
let cfg = "ntrip://rtk2go.com:2101".parse::<NtripConfig>().unwrap();
assert_eq!(cfg.host, "rtk2go.com");
assert_eq!(cfg.port, 2101);
assert_eq!(cfg.use_tls, false);
This also matches on RtcmProvider’s for convenience.
let cfg = "linz".parse::<NtripConfig>().unwrap();
assert_eq!(cfg.host, "positionz-rt.linz.govt.nz");
assert_eq!(cfg.port, 2101);
assert_eq!(cfg.use_tls, false);
Source§impl Parser for NtripConfig
impl Parser for NtripConfig
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Source§impl PartialEq for NtripConfig
impl PartialEq for NtripConfig
Source§impl Serialize for NtripConfig
impl Serialize for NtripConfig
impl StructuralPartialEq for NtripConfig
Auto 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§
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