[][src]Struct opcua_server::server::Server

pub struct Server { /* fields omitted */ }

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.

Methods

impl Server[src]

pub fn new(config: ServerConfig) -> Server[src]

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

pub fn run(self)[src]

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

pub fn run_server(server: Arc<RwLock<Server>>)[src]

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

pub fn server_state(&self) -> Arc<RwLock<ServerState>>[src]

pub fn certificate_store(&self) -> Arc<RwLock<CertificateStore>>[src]

pub fn address_space(&self) -> Arc<RwLock<AddressSpace>>[src]

pub fn connections(&self) -> Arc<RwLock<Connections>>[src]

pub fn server_metrics(&self) -> Arc<RwLock<ServerMetrics>>[src]

pub fn abort(&mut self)[src]

pub fn add_polling_action<F>(&mut self, interval_ms: u64, action: F) where
    F: Fn() + Send + Sync + 'static, 
[src]

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

pub fn new_transport(&self) -> TcpTransport[src]

Trait Implementations

impl From<ServerConfig> for Server[src]

Auto Trait Implementations

impl Send for Server

impl Sync for Server

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T