Session

Struct Session 

Source
pub struct Session { /* private fields */ }
Expand description

The Session is any state maintained between the client and server

Implementations§

Source§

impl Session

Source

pub fn new(server_state: Arc<RwLock<ServerState>>) -> Session

Create a Session from a Server

Source

pub fn session_id(&self) -> &NodeId

Source

pub fn set_activated(&mut self, activated: bool)

Source

pub fn is_activated(&self) -> bool

Source

pub fn is_terminated(&self) -> bool

Source

pub fn terminated_at(&self) -> DateTimeUtc

Source

pub fn set_terminated(&mut self)

Source

pub fn authentication_token(&self) -> &NodeId

Source

pub fn set_authentication_token(&mut self, authentication_token: NodeId)

Source

pub fn session_timeout(&self) -> f64

Source

pub fn set_session_timeout(&mut self, session_timeout: f64)

Source

pub fn set_max_request_message_size(&mut self, max_request_message_size: u32)

Source

pub fn set_max_response_message_size(&mut self, max_response_message_size: u32)

Source

pub fn endpoint_url(&self) -> &UAString

Source

pub fn set_endpoint_url(&mut self, endpoint_url: UAString)

Source

pub fn set_security_policy_uri(&mut self, security_policy_uri: &str)

Source

pub fn set_user_identity(&mut self, user_identity: IdentityToken)

Source

pub fn last_service_request_timestamp(&self) -> DateTimeUtc

Source

pub fn set_last_service_request_timestamp( &mut self, last_service_request_timestamp: DateTimeUtc, )

Source

pub fn locale_ids(&self) -> &Option<Vec<UAString>>

Source

pub fn set_locale_ids(&mut self, locale_ids: Option<Vec<UAString>>)

Source

pub fn client_certificate(&self) -> &Option<X509>

Source

pub fn set_client_certificate(&mut self, client_certificate: Option<X509>)

Source

pub fn session_nonce(&self) -> &ByteString

Source

pub fn set_session_nonce(&mut self, session_nonce: ByteString)

Source

pub fn session_name(&self) -> &UAString

Source

pub fn set_session_name(&mut self, session_name: UAString)

Source

pub fn client_user_id(&self) -> UAString

Helper function to return the client user id from the identity token or None of there is no user id

This conforms to OPC Part 5 6.4.3 ClientUserId

Source

pub fn is_session_terminated(&self) -> bool

Source

pub fn terminate_session(&mut self)

Trait Implementations§

Source§

impl Drop for Session

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.