Skip to main content

ContextSource

Trait ContextSource 

Source
pub trait ContextSource: Send + Sync {
    // Required method
    fn fetch<'a>(
        &'a self,
        fields: &'a [String],
        cx: &'a CallContext,
    ) -> BoxFuture<'a, Result<Snapshot, String>>;
}
Expand description

Supplies an authorized context snapshot. Returns only what the caller may read; a missing field is reported missing, never filled.

Required Methods§

Source

fn fetch<'a>( &'a self, fields: &'a [String], cx: &'a CallContext, ) -> BoxFuture<'a, Result<Snapshot, String>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§