pub struct ClientBuilder<T: TransportPort> { /* private fields */ }Expand description
Generic builder for BACnetClient with a pre-built transport.
Implementations§
Source§impl<T: TransportPort + 'static> ClientBuilder<T>
impl<T: TransportPort + 'static> ClientBuilder<T>
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 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.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ClientBuilder<T>
impl<T> !UnwindSafe for ClientBuilder<T>
impl<T> Freeze for ClientBuilder<T>
impl<T> Send for ClientBuilder<T>
impl<T> Sync for ClientBuilder<T>
impl<T> Unpin for ClientBuilder<T>
impl<T> UnsafeUnpin for ClientBuilder<T>where
Option<T>: UnsafeUnpin,
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