[][src]Struct kubos_service::Context

pub struct Context<T> {
    pub subsystem: T,
    pub storage: Arc<RwLock<HashMap<String, String>>>,
}

Context struct used by a service to provide Juniper context, subsystem access and persistent storage.

Fields

Methods

impl<T> Context<T>
[src]

Returns a reference to the context's subsystem instance

Attempts to get a value from the context's storage

Arguments

name - Key to search for in storage

Sets a value in the context's storage

Arguments

key - Key to store value under value - Value to store

Clears a single key/value from storage

Arguments

key - Key to clear (along with corresponding value)

Clears all key/value pairs from storage

Trait Implementations

impl<T: Clone> Clone for Context<T>
[src]

Performs copy-assignment from source. Read more

impl<T> Context for Context<T>
[src]

Auto Trait Implementations

impl<T> Send for Context<T> where
    T: Send

impl<T> Sync for Context<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> FromContext for T where
    T: Context, 

impl<T> Erased for T

impl<T> Same for T

Should always be Self