Struct open62541::ClientBuilder
source · pub struct ClientBuilder(/* private fields */);
Expand description
Builder for Client
.
Use this to specify additional options before connecting to an OPC UA endpoint.
§Examples
use open62541::ClientBuilder;
use std::time::Duration;
let client = ClientBuilder::default()
.secure_channel_lifetime(Duration::from_secs(60))
.connect("opc.tcp://opcuademo.sterfive.com:26543")?;
Implementations§
source§impl ClientBuilder
impl ClientBuilder
sourcepub fn secure_channel_lifetime(self, secure_channel_lifetime: Duration) -> Self
pub fn secure_channel_lifetime(self, secure_channel_lifetime: Duration) -> Self
Sets secure channel life time.
§Panics
The given duration must be non-negative and less than 4,294,967,295 milliseconds (less than 49.7 days).
sourcepub fn requested_session_timeout(
self,
requested_session_timeout: Duration
) -> Self
pub fn requested_session_timeout( self, requested_session_timeout: Duration ) -> Self
Sets requested session timeout.
§Panics
The given duration must be non-negative and less than 4,294,967,295 milliseconds (less than 49.7 days).
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl !Sync for ClientBuilder
impl Unpin 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