pub struct RequestContext {
pub current_node_manager_index: usize,
/* private fields */
}Expand description
Context object passed during requests, contains useful context the node managers can use to execute service calls.
Fields§
§current_node_manager_index: usizeIndex of the current node manager.
Implementations§
Source§impl RequestContext
impl RequestContext
Sourcepub fn get_type_tree_for_user<'a>(&'a self) -> Box<dyn TypeTreeReadContext + 'a>
pub fn get_type_tree_for_user<'a>(&'a self) -> Box<dyn TypeTreeReadContext + 'a>
Get the type tree for the current user.
Sourcepub fn session(&self) -> &RwLock<RawRwLock, Session>
pub fn session(&self) -> &RwLock<RawRwLock, Session>
Get the session object responsible for this service call.
Sourcepub fn session_id(&self) -> u32
pub fn session_id(&self) -> u32
Get the session ID for the session responsible for this service call.
Sourcepub fn authenticator(&self) -> &(dyn AuthManager + 'static)
pub fn authenticator(&self) -> &(dyn AuthManager + 'static)
Get the global AuthManager object.
Sourcepub fn user_token(&self) -> &UserToken
pub fn user_token(&self) -> &UserToken
Get the current user token.
Sourcepub fn type_tree(&self) -> &RwLock<RawRwLock, DefaultTypeTree>
pub fn type_tree(&self) -> &RwLock<RawRwLock, DefaultTypeTree>
Get the global type tree object. If your server needs per-user type trees,
use get_type_tree_for_user instead.
Sourcepub fn subscriptions(&self) -> &SubscriptionCache
pub fn subscriptions(&self) -> &SubscriptionCache
Get the subscription cache.
Sourcepub fn info(&self) -> &ServerInfo
pub fn info(&self) -> &ServerInfo
Get the server info object.
Trait Implementations§
Source§impl Clone for RequestContext
impl Clone for RequestContext
Source§fn clone(&self) -> RequestContext
fn clone(&self) -> RequestContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Deref for RequestContext
impl Deref for RequestContext
Source§type Target = RequestContextInner
type Target = RequestContextInner
The resulting type after dereferencing.
Source§fn deref(&self) -> &RequestContextInner
fn deref(&self) -> &RequestContextInner
Dereferences the value.
Auto Trait Implementations§
impl Freeze for RequestContext
impl !RefUnwindSafe for RequestContext
impl Send for RequestContext
impl Sync for RequestContext
impl Unpin for RequestContext
impl UnsafeUnpin for RequestContext
impl !UnwindSafe for RequestContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more