Struct consecuit::construction::hook::HookBuilder [−][src]
pub struct HookBuilder { /* fields omitted */ }
Expand description
The initial consecuit
or cc
object that every hook takes as first argument.
For more information on how to write hooks, see the docs at crate.
Implementations
pub fn hook<Arg, Out, Ret, RestStores>(
self,
hook_func: fn(_: HookBuilder, _: Arg) -> Ret,
hook_arg: Arg
) -> (HookConstruction<RestStores, StoreCons<Ret::StoresList, RestStores>>, Out) where
RestStores: StoresList,
Ret: HookReturn<Out>,
pub fn hook<Arg, Out, Ret, RestStores>(
self,
hook_func: fn(_: HookBuilder, _: Arg) -> Ret,
hook_arg: Arg
) -> (HookConstruction<RestStores, StoreCons<Ret::StoresList, RestStores>>, Out) where
RestStores: StoresList,
Ret: HookReturn<Out>,
This is a shortcut that calls cc.init().hook(...)
It is here so you don’t have to write let cc = cc.init();
at the beginning of every hook function.
See the docs at crate
on how to call hooks.
See HookConstruction
for the actual .hook(...)
.
Make it ready to call .hook(...)
.
You shouldn’t need this, as we have a shortbut that automatically call it when you call .hook(...)
.
Auto Trait Implementations
impl !RefUnwindSafe for HookBuilder
impl !Send for HookBuilder
impl !Sync for HookBuilder
impl Unpin for HookBuilder
impl !UnwindSafe for HookBuilder