Struct opcua_server::server::Server

source ·
pub struct Server {
    pub certificate_store: Arc<RwLock<CertificateStore>>,
    pub server_metrics: Arc<RwLock<ServerMetrics>>,
    pub server_state: Arc<RwLock<ServerState>>,
    pub address_space: Arc<RwLock<AddressSpace>>,
    pub connections: Arc<RwLock<Connections>>,
    /* private fields */
}
Expand description

This represents a running instance of an OPC UA server. There can be more than one server running at a time providing they do not share the same thread or listen on the same ports.

A Server is initialised from a ServerConfig which determines what port the server runs on, the endpoints it supports, the identity tokens it supports and so forth.

The server’s AddressSpace is initialised with the default address space values, but may also be extended with additional nodes representing folders, variables, methods etc.

The server’s CertificateStore manages the server’s private key and public certificate. It also manages public certificates of incoming clients and arranges them into trusted and rejected collections.

Fields§

§certificate_store: Arc<RwLock<CertificateStore>>

Certificate store for certs

§server_metrics: Arc<RwLock<ServerMetrics>>

Server metrics - diagnostics and anything else that someone might be interested in that describes the current state of the server

§server_state: Arc<RwLock<ServerState>>

The server state is everything that sessions share that can possibly change. State is initialised from a ServerConfig.

§address_space: Arc<RwLock<AddressSpace>>

Address space

§connections: Arc<RwLock<Connections>>

List of open connections

Implementations§

Creates a new Server instance, initialising it from a ServerConfig.

Runs the server which blocks until it completes either by aborting or by error. Typically a server should be run on its own thread.

Runs the supplied server reference counted server. The function will block until the server terminates, i.e. all running tokio tasks finish.

Creates a polling action that happens continuously on an interval while the server is running.

Trait Implementations§

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.