pub struct Client(/* private fields */);
Expand description
Connected OPC UA client.
This represents an OPC UA client connected to a specific endpoint. Once a client is connected to an endpoint, it is not possible to switch to another server. Create a new client for that.
Once a connection to the given endpoint is established, the client keeps the connection open and reconnects if necessary.
If the connection fails unrecoverably, the client is no longer usable. In this case create a new client if required.
Implementations§
source§impl Client
impl Client
sourcepub fn new(endpoint_url: &str) -> Result<Self, Error>
pub fn new(endpoint_url: &str) -> Result<Self, Error>
Creates client connected to endpoint.
If you need more control over the initialization, use ClientBuilder
instead, and turn it
into Client
by calling connect()
.
§Errors
§Panics
sourcepub fn into_async(self, cycle_time: Duration) -> AsyncClient
pub fn into_async(self, cycle_time: Duration) -> AsyncClient
Turns client into AsyncClient
.
The AsyncClient
can be used to access methods in an asynchronous way.
cycle_time
controls the frequency at which the client will poll the server for responses
in the background.