oasis_core_runtime/enclave_rpc/context.rs
1//! RPC call context.
2use std::sync::Arc;
3
4use super::session::SessionInfo;
5
6/// RPC call context.
7pub struct Context {
8 /// Information about the session the RPC call was delivered over.
9 pub session_info: Option<Arc<SessionInfo>>,
10}
11
12impl Context {
13 /// Construct new transaction context.
14 pub fn new(session_info: Option<Arc<SessionInfo>>) -> Self {
15 Self { session_info }
16 }
17}