[−][src]Struct opcua_server::builder::ServerBuilder
The ServerBuilder is a builder for producing a Server. It is an alternative to constructing
a ServerConfig from file or from scratch.
Implementations
impl ServerBuilder[src]
pub fn new() -> Self[src]
pub fn from_config(config: ServerConfig) -> Self[src]
Reads the config in as a starting point
pub fn new_anonymous<T>(application_name: T) -> Self where
T: Into<String>, [src]
T: Into<String>,
Creates a simple endpoint that accepts anonymous connections
pub fn new_sample() -> Self[src]
Creates and yields a builder which is configured with the sample server configuration. Use this for testing and similar reasons. Do not rely upon this in production code because it could change.
pub fn server(self) -> Option<Server>[src]
Yields a [Client] from the values set by the builder. If the builder is not in a valid state
it will return None.
pub fn config(self) -> ServerConfig[src]
Yields a [ClientConfig] from the values set by the builder.
pub fn is_valid(&self) -> bool[src]
Test if the builder can yield a server with the configuration supplied.
pub fn application_name<T>(self, application_name: T) -> Self where
T: Into<String>, [src]
T: Into<String>,
Sets the application name.
pub fn application_uri<T>(self, application_uri: T) -> Self where
T: Into<String>, [src]
T: Into<String>,
Sets the application uri
pub fn product_uri<T>(self, product_uri: T) -> Self where
T: Into<String>, [src]
T: Into<String>,
Sets the product uri.
pub fn create_sample_keypair(self, create_sample_keypair: bool) -> Self[src]
Sets whether the client should generate its own key pair if there is none found in the pki directory.
pub fn pki_dir<T>(self, pki_dir: T) -> Self where
T: Into<PathBuf>, [src]
T: Into<PathBuf>,
Sets the pki directory where client's own key pair is stored and where /trusted and
/rejected server certificates are stored.
pub fn endpoint<T>(self, endpoint_id: T, endpoint: ServerEndpoint) -> Self where
T: Into<String>, [src]
T: Into<String>,
Adds an endpoint to the list of endpoints the client knows of.
pub fn endpoints<T>(self, endpoints: Vec<(T, ServerEndpoint)>) -> Self where
T: Into<String>, [src]
T: Into<String>,
Adds multiple endpoints to the list of endpoints the client knows of.
pub fn user_token<T>(
self,
user_token_id: T,
user_token: ServerUserToken
) -> Self where
T: Into<String>, [src]
self,
user_token_id: T,
user_token: ServerUserToken
) -> Self where
T: Into<String>,
Adds a user token to the server.
pub fn discovery_server_url(self, discovery_server_url: Option<String>) -> Self[src]
Sets the discovery server url that this server shall attempt to register itself with.
pub fn host_and_port<T>(self, host: T, port: u16) -> Self where
T: Into<String>, [src]
T: Into<String>,
Sets the hostname and port to listen on
pub fn discovery_urls(self, discovery_urls: Vec<String>) -> Self[src]
Discovery endpoint urls - the urls of this server used by clients to get endpoints. If the url is relative, e.g. "/" then the code will make a url for you using the port/host settings as they are at the time this function is executed.
pub fn max_subscriptions(self, max_subscriptions: u32) -> Self[src]
Set the maximum number of subscriptions in a session
pub fn max_monitored_items_per_sub(
self,
max_monitored_items_per_sub: u32
) -> Self[src]
self,
max_monitored_items_per_sub: u32
) -> Self
Set the maximum number of monitored items per subscription
pub fn max_array_length(self, max_array_length: u32) -> Self[src]
Set the max array length in elements
pub fn max_string_length(self, max_string_length: u32) -> Self[src]
Set the max string length in characters, i.e. if you set max to 1000 characters, then with UTF-8 encoding potentially that's 4000 bytes.
pub fn max_byte_string_length(self, max_byte_string_length: u32) -> Self[src]
Set the max bytestring length in bytes
pub fn trust_client_certs(self) -> Self[src]
Sets the server to automatically trust client certs. This subverts the authentication during handshake, so only do this if you understand the risks.
pub fn clients_can_modify_address_space(self) -> Self[src]
Set that clients can modify the address space, i.e. they can add or remove nodes through the node management service. By default, they cannot.
Auto Trait Implementations
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnwindSafe for ServerBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,