Struct opcua_server::config::ServerEndpoint
source · [−]pub struct ServerEndpoint {
pub path: String,
pub security_policy: String,
pub security_mode: String,
pub security_level: u8,
pub password_security_policy: Option<String>,
pub user_token_ids: BTreeSet<String>,
}
Fields
path: String
Endpoint path
security_policy: String
Security policy
security_mode: String
Security mode
security_level: u8
Security level, higher being more secure
password_security_policy: Option<String>
Password security policy when a client supplies a user name identity token
user_token_ids: BTreeSet<String>
User tokens
Implementations
sourceimpl ServerEndpoint
impl ServerEndpoint
pub fn new<T>(
path: T,
security_policy: SecurityPolicy,
security_mode: MessageSecurityMode,
user_token_ids: &[String]
) -> Self where
T: Into<String>,
pub fn new_none<T>(path: T, user_token_ids: &[String]) -> Self where
T: Into<String>,
pub fn new_basic128rsa15_sign<T>(path: T, user_token_ids: &[String]) -> Self where
T: Into<String>,
pub fn new_basic128rsa15_sign_encrypt<T>(
path: T,
user_token_ids: &[String]
) -> Self where
T: Into<String>,
pub fn new_basic256_sign<T>(path: T, user_token_ids: &[String]) -> Self where
T: Into<String>,
pub fn new_basic256_sign_encrypt<T>(path: T, user_token_ids: &[String]) -> Self where
T: Into<String>,
pub fn new_basic256sha256_sign<T>(path: T, user_token_ids: &[String]) -> Self where
T: Into<String>,
pub fn new_basic256sha256_sign_encrypt<T>(
path: T,
user_token_ids: &[String]
) -> Self where
T: Into<String>,
pub fn new_aes128_sha256_rsaoaep_sign<T>(
path: T,
user_token_ids: &[String]
) -> Self where
T: Into<String>,
pub fn new_aes128_sha256_rsaoaep_sign_encrypt<T>(
path: T,
user_token_ids: &[String]
) -> Self where
T: Into<String>,
pub fn new_aes256_sha256_rsapss_sign<T>(
path: T,
user_token_ids: &[String]
) -> Self where
T: Into<String>,
pub fn new_aes256_sha256_rsapss_sign_encrypt<T>(
path: T,
user_token_ids: &[String]
) -> Self where
T: Into<String>,
pub fn is_valid(
&self,
id: &str,
user_tokens: &BTreeMap<String, ServerUserToken>
) -> bool
pub fn security_policy(&self) -> SecurityPolicy
pub fn message_security_mode(&self) -> MessageSecurityMode
pub fn endpoint_url(&self, base_endpoint: &str) -> String
sourcepub fn password_security_policy(&self) -> SecurityPolicy
pub fn password_security_policy(&self) -> SecurityPolicy
Returns the effective password security policy for the endpoint. This is the explicitly set password security policy, or just the regular security policy.
sourcepub fn supports_anonymous(&self) -> bool
pub fn supports_anonymous(&self) -> bool
Test if the endpoint supports anonymous users
sourcepub fn supports_user_pass(
&self,
server_tokens: &BTreeMap<String, ServerUserToken>
) -> bool
pub fn supports_user_pass(
&self,
server_tokens: &BTreeMap<String, ServerUserToken>
) -> bool
Tests if this endpoint supports user pass tokens. It does this by looking to see if any of the users allowed to access this endpoint are user pass users.
sourcepub fn supports_x509(
&self,
server_tokens: &BTreeMap<String, ServerUserToken>
) -> bool
pub fn supports_x509(
&self,
server_tokens: &BTreeMap<String, ServerUserToken>
) -> bool
Tests if this endpoint supports x509 tokens. It does this by looking to see if any of the users allowed to access this endpoint are x509 users.
pub fn supports_user_token_id(&self, id: &str) -> bool
Trait Implementations
sourceimpl Clone for ServerEndpoint
impl Clone for ServerEndpoint
sourcefn clone(&self) -> ServerEndpoint
fn clone(&self) -> ServerEndpoint
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ServerEndpoint
impl Debug for ServerEndpoint
sourceimpl<'de> Deserialize<'de> for ServerEndpoint
impl<'de> Deserialize<'de> for ServerEndpoint
sourcefn 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
sourceimpl<'a> From<(&'a str, SecurityPolicy, MessageSecurityMode, &'a [&'a str])> for ServerEndpoint
impl<'a> From<(&'a str, SecurityPolicy, MessageSecurityMode, &'a [&'a str])> for ServerEndpoint
Convenience method to make an endpoint from a tuple
sourcefn from(
v: (&'a str, SecurityPolicy, MessageSecurityMode, &'a [&'a str])
) -> ServerEndpoint
fn from(
v: (&'a str, SecurityPolicy, MessageSecurityMode, &'a [&'a str])
) -> ServerEndpoint
Converts to this type from the input type.
sourceimpl PartialEq<ServerEndpoint> for ServerEndpoint
impl PartialEq<ServerEndpoint> for ServerEndpoint
sourcefn eq(&self, other: &ServerEndpoint) -> bool
fn eq(&self, other: &ServerEndpoint) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ServerEndpoint) -> bool
fn ne(&self, other: &ServerEndpoint) -> bool
This method tests for !=
.
sourceimpl Serialize for ServerEndpoint
impl Serialize for ServerEndpoint
impl StructuralPartialEq for ServerEndpoint
Auto Trait Implementations
impl RefUnwindSafe for ServerEndpoint
impl Send for ServerEndpoint
impl Sync for ServerEndpoint
impl Unpin for ServerEndpoint
impl UnwindSafe for ServerEndpoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more