pub fn succeed<F>(f: F) -> Task<T>
    where
        F: 'static + FnOnce() -> T,
    {
        Task::new(move || Ok(f()))
    }
/// Creates a new [`Task`] from a lazy operation that cannot fail.
///
/// ```rust
/// # use coffee::load::Task;
/// struct Map {
///     // ...
/// }
///
/// impl Map {
///     pub fn generate() -> Map {
///         Map { /*...*/ }
///     }
/// }
///
/// let generate_map = Task::succeed(Map::generate);
/// ```
///
/// [`Task`]: struct.Task.html
Creates a new [`Task`] from a lazy operation that cannot fail.
Creates a new [ ` Task ` ] from a lazy operation that cannot fail .
pub fn succeed<F>(f: F) -> Task<T>
    where
        F: 'static + FnOnce() -> T,
    {
        Task::new(move || Ok(f()))
    }
pub fn succeed < F > ( f : F ) -> Task < T > where F : ' static + FnOnce ( ) -> T , { Task :: new ( move | | Ok ( f ( ) ) ) }
Creates a new [`Task`] from a lazy operation that cannot fail.
Creates a new [ ` Task ` ] from a lazy operation that cannot fail .
f
F
f
F
use coffee::load::task;
struct Map {

}



let generate_map = Task::succeed(Map::generate);
```

[`Task`]: struct.Task.html
struct Map { } let generate_map = Task :: succeed ( Map :: generate ) ; ` ` ` [ ` Task ` ] : struct . Task . html