[][src]Struct kubos_service::Context

pub struct Context<T> { /* fields omitted */ }

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

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> Context for Context<T>
[src]

Auto Trait Implementations

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

impl<T> !Sync for Context<T>

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

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

Performs the conversion.

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.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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.

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

Performs the conversion.

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

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

Perform the conversion