Trait channel_loader::Loadable[][src]

pub trait Loadable<T: TaskHandler> {
    fn load_by(key: T::Key) -> Receiver<Result<Option<Arc<T::Value>>, T::Error>>
    where
        T: TaskHandler
; }
Expand description

Loadable types load using the corresponding static loader associated by type via define_static_loader

Required methods

Load a value by it’s key in a batched load. If no TaskHandler is pending assignment, one will be scheduled. Even though this is scheduled up front, task assignment is deferred and will capture all loads that come thereafter; for a given request, it is guaranteed all loads will be enqueued before task assigment and batched optimally.

Implementors