Struct opcua_server::config::ServerConfig [−][src]
pub struct ServerConfig {Show 14 fields
pub application_name: String,
pub application_uri: String,
pub product_uri: String,
pub pki_dir: PathBuf,
pub create_sample_keypair: bool,
pub trust_client_certs: bool,
pub discovery_server_url: Option<String>,
pub tcp_config: TcpConfig,
pub limits: ServerLimits,
pub locale_ids: Vec<String>,
pub user_tokens: BTreeMap<String, ServerUserToken>,
pub discovery_urls: Vec<String>,
pub default_endpoint: Option<String>,
pub endpoints: BTreeMap<String, ServerEndpoint>,
}Fields
application_name: StringAn id for this server
application_uri: StringA description for this server
product_uri: StringProduct url
pki_dir: PathBufpki folder, either absolute or relative to executable
create_sample_keypair: boolAutocreates public / private keypair if they don’t exist. For testing/samples only since you do not have control of the values
trust_client_certs: boolAuto trusts client certificates. For testing/samples only unless you’re sure what you’re doing.
discovery_server_url: Option<String>Url to a discovery server - adding this string causes the server to assume you wish to register the server with a discovery server.
tcp_config: TcpConfigtcp configuration information
limits: ServerLimitsServer limits
locale_ids: Vec<String>Supported locale ids
user_tokens: BTreeMap<String, ServerUserToken>User tokens
discovery_urls: Vec<String>discovery endpoint url which may or may not be the same as the service endpoints below.
default_endpoint: Option<String>Default endpoint id
endpoints: BTreeMap<String, ServerEndpoint>Endpoints supported by the server
Implementations
pub fn new<T>(
application_name: T,
user_tokens: BTreeMap<String, ServerUserToken>,
endpoints: BTreeMap<String, ServerEndpoint>
) -> Self where
T: Into<String>,
Returns a opc.tcp://server:port url that paths can be appended onto
Find the default endpoint
pub fn find_endpoint(
&self,
endpoint_url: &str,
security_policy: SecurityPolicy,
security_mode: MessageSecurityMode
) -> Option<&ServerEndpoint>
pub fn find_endpoint(
&self,
endpoint_url: &str,
security_policy: SecurityPolicy,
security_mode: MessageSecurityMode
) -> Option<&ServerEndpoint>
Find the first endpoint that matches the specified url, security policy and message security mode.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations
Mutably borrows from an owned value. Read more