FnContextSendSync

Trait FnContextSendSync 

Source
pub trait FnContextSendSync<R>:
    Fn(Context) -> R
    + Send
    + Sync { }
Expand description

A generic trait for functions that take a Context and return a value.

This trait encapsulates the common behavior of being a sendable, synchronous function that accepts a Context. It is used as a base for other, more specific function traits.

Implementors§

Source§

impl<F, R> FnContextSendSync<R> for F
where F: Fn(Context) -> R + Send + Sync,

A blanket implementation for any function that takes a Context and returns a value.

This implementation makes it easy to use any compatible function as a FnContextSendSync, promoting a flexible and functional programming style.