pub struct RequestContext {
pub session: Arc<RwLock<Session>>,
pub session_id: u32,
pub authenticator: Arc<dyn AuthManager>,
pub token: UserToken,
pub current_node_manager_index: usize,
pub type_tree: Arc<RwLock<DefaultTypeTree>>,
pub type_tree_getter: Arc<dyn TypeTreeForUser>,
pub subscriptions: Arc<SubscriptionCache>,
pub info: Arc<ServerInfo>,
}Expand description
Context object passed during writes, contains useful context the node managers can use to execute service calls.
Fields§
§session: Arc<RwLock<Session>>The full session object for the session responsible for this service call.
session_id: u32The session ID for the session responsible for this service call.
authenticator: Arc<dyn AuthManager>The global AuthManager object.
token: UserTokenThe current user token.
current_node_manager_index: usizeIndex of the current node manager.
type_tree: Arc<RwLock<DefaultTypeTree>>Global type tree object.
type_tree_getter: Arc<dyn TypeTreeForUser>Wrapper to get a type tree
subscriptions: Arc<SubscriptionCache>Subscription cache, containing all subscriptions on the server.
info: Arc<ServerInfo>Server info object, containing configuration and other shared server state.
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.
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 moreAuto Trait Implementations§
impl Freeze for RequestContext
impl !RefUnwindSafe for RequestContext
impl Send for RequestContext
impl Sync for RequestContext
impl Unpin 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