pub struct ClientBuilder { /* private fields */ }Expand description
Fluent builder for a BacnetClient.
Obtain one from BacnetClient::builder.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn local_addr(self, host: impl Into<String>) -> Self
pub fn local_addr(self, host: impl Into<String>) -> Self
Set the local host/interface to bind to (default "0.0.0.0").
Sourcepub fn port(self, port: u16) -> Self
pub fn port(self, port: u16) -> Self
Set the local UDP port to bind (default 0, an OS-assigned port).
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Set the per-request timeout (default 5 seconds).
Sourcepub fn retries(self, retries: u8) -> Self
pub fn retries(self, retries: u8) -> Self
Set the number of retries after an initial timeout (default 0).
Sourcepub fn build(self) -> Result<BacnetClient, ClientError>
pub fn build(self) -> Result<BacnetClient, ClientError>
Consume the builder and bind the client’s socket.
Trait Implementations§
Source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
Source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientBuilder
impl Debug for ClientBuilder
Source§impl Default for ClientBuilder
impl Default for ClientBuilder
Source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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