pub struct ClientBuilder<T: TransportPort = AnyTransport> { /* private fields */ }Expand description
Generic builder for BACnetClient with a pre-built transport. The
transport type defaults to AnyTransport, as BACnetClient’s does.
Implementations§
Source§impl<T: TransportPort + 'static> ClientBuilder<T>
impl<T: TransportPort + 'static> ClientBuilder<T>
Sourcepub fn event_channel_capacity(self, capacity: usize) -> Self
pub fn event_channel_capacity(self, capacity: usize) -> Self
Set the independent event notification broadcast channel capacity.
Sourcepub fn apdu_retries(self, retries: u8) -> Self
pub fn apdu_retries(self, retries: u8) -> Self
Set the number of APDU retries before a confirmed request times out.
Sourcepub fn min_request_interval_ms(self, ms: u64) -> Self
pub fn min_request_interval_ms(self, ms: u64) -> Self
Set the least time, in milliseconds, from the latest confirmed
request to a destination finishing to the next being sent (default
0: no pacing; at most an hour). See
ClientConfig::min_request_interval_ms.
Sourcepub fn max_segments(self, max_segments: Option<u8>) -> Self
pub fn max_segments(self, max_segments: Option<u8>) -> Self
Set the maximum number of APDU segments this client accepts.
Values 0 and 1 fail at build time. Other finite non-rung values are conservatively rounded down in Confirmed-Request headers.
Sourcepub fn segmented_response_accepted(self, accepted: bool) -> Self
pub fn segmented_response_accepted(self, accepted: bool) -> Self
Set whether this client accepts segmented responses.
Sourcepub fn proposed_window_size(self, window_size: u8) -> Self
pub fn proposed_window_size(self, window_size: u8) -> Self
Set the proposed segmented-transfer window size.
Sourcepub fn confirmed_cov_notification_ack_policy<F>(self, policy: F) -> Self
pub fn confirmed_cov_notification_ack_policy<F>(self, policy: F) -> Self
Set the response policy for decoded ConfirmedCOVNotifications.
Source§impl<T: TransportPort + 'static> ClientBuilder<T>
impl<T: TransportPort + 'static> ClientBuilder<T>
Sourcepub fn apdu_timeout_ms(self, ms: u64) -> Self
pub fn apdu_timeout_ms(self, ms: u64) -> Self
Set APDU timeout in milliseconds.
Sourcepub fn max_apdu_length(self, len: u16) -> Self
pub fn max_apdu_length(self, len: u16) -> Self
Set the maximum APDU length this client accepts.
Sourcepub fn cov_channel_capacity(self, capacity: usize) -> Self
pub fn cov_channel_capacity(self, capacity: usize) -> Self
Set the COV notification broadcast channel capacity.
Sourcepub async fn build(self) -> Result<BACnetClient<T>, Error>
pub async fn build(self) -> Result<BACnetClient<T>, Error>
Build and start the client.