pub struct AprsClientConfigBuilder { /* private fields */ }Expand description
Fluent builder for AprsClientConfig.
Validates callsign / SSID / symbol at Self::build time and
returns a descriptive crate::error::ValidationError on bad input.
Implementations§
Source§impl AprsClientConfigBuilder
impl AprsClientConfigBuilder
Sourcepub fn new(callsign: &str, ssid: u8) -> Self
pub fn new(callsign: &str, ssid: u8) -> Self
Create a new builder with sensible defaults for a mobile station.
Sourcepub const fn symbol(self, table: char, code: char) -> Self
pub const fn symbol(self, table: char, code: char) -> Self
Set both symbol table and code in one call.
Sourcepub fn beacon_comment(self, s: &str) -> Self
pub fn beacon_comment(self, s: &str) -> Self
Set the default beacon comment.
Sourcepub const fn smart_beaconing(self, sb: SmartBeaconingConfig) -> Self
pub const fn smart_beaconing(self, sb: SmartBeaconingConfig) -> Self
Replace the SmartBeaconing config.
Sourcepub fn digipeater(self, cfg: DigipeaterConfig) -> Self
pub fn digipeater(self, cfg: DigipeaterConfig) -> Self
Attach a digipeater configuration.
Sourcepub const fn max_stations(self, n: usize) -> Self
pub const fn max_stations(self, n: usize) -> Self
Maximum number of stations tracked in the station list.
Sourcepub const fn station_timeout_secs(self, s: u64) -> Self
pub const fn station_timeout_secs(self, s: u64) -> Self
Station entry expiry in seconds.
Sourcepub const fn auto_ack(self, on: bool) -> Self
pub const fn auto_ack(self, on: bool) -> Self
Whether to auto-ack incoming messages addressed to us.
Sourcepub fn digipeater_path(self, path: Vec<Ax25Address>) -> Self
pub fn digipeater_path(self, path: Vec<Ax25Address>) -> Self
Replace the outgoing digipeater path.
Sourcepub const fn auto_query_response(self, on: bool) -> Self
pub const fn auto_query_response(self, on: bool) -> Self
Whether to auto-respond to ?APRSP position queries.
Sourcepub const fn auto_query_position(self, lat: f64, lon: f64) -> Self
pub const fn auto_query_position(self, lat: f64, lon: f64) -> Self
Cache a position for auto query responses.
Sourcepub fn build(self) -> Result<AprsClientConfig, ValidationError>
pub fn build(self) -> Result<AprsClientConfig, ValidationError>
Validate the accumulated fields and build the config.
§Errors
Returns crate::error::ValidationError::AprsWireOutOfRange if the callsign
fails validation, the SSID is out of range, or the symbol table
byte is outside the APRS-defined set (/, \\, 0-9, A-Z).
Trait Implementations§
Source§impl Clone for AprsClientConfigBuilder
impl Clone for AprsClientConfigBuilder
Source§fn clone(&self) -> AprsClientConfigBuilder
fn clone(&self) -> AprsClientConfigBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more