Struct kubos_service::Context
source · [−]Expand description
Context struct used by a service to provide Juniper context, subsystem access and persistent storage.
Fields
subsystem: T
storage: Arc<RwLock<HashMap<String, String>>>
Implementations
sourceimpl<T> Context<T>
impl<T> Context<T>
sourcepub fn set(&self, key: &str, value: &str)
pub fn set(&self, key: &str, value: &str)
Sets a value in the context’s storage
Arguments
key
- Key to store value under
value
- Value to store
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Context<T> where
T: RefUnwindSafe,
impl<T> Send for Context<T> where
T: Send,
impl<T> Sync for Context<T> where
T: Sync,
impl<T> Unpin for Context<T> where
T: Unpin,
impl<T> UnwindSafe for Context<T> where
T: UnwindSafe,
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