pub fn register_after_node_create(
        &mut self,
        names: Vec<String>,
        f: AfterNodeEventFunc<RequestCtx>,
    ) {
        for name in names {
            if let Some(handlers) = self.after_node_create_handlers.get_mut(&name) {
                handlers.push(f);
            } else {
                self.after_node_create_handlers.insert(name, vec![f]);
            }
        }
    }
/// Registers an event handler `f` to be called after a node of type `type_name` is created.
///
/// # Examples
///
/// ```rust
/// # use warpgrapher::engine::events::{EventHandlerBag, EventFacade};
/// # use warpgrapher::Error;
/// # use warpgrapher::engine::value::Value;
/// # use warpgrapher::engine::objects::Node;
/// # use warpgrapher::juniper::BoxFuture;
///
/// fn after_user_create(nodes: Vec<Node<()>>, ef: EventFacade<()>) -> BoxFuture<Result<Vec<Node<()>>, Error>> {
///    Box::pin(async move {
///         // Normally work would be done here, resulting in some new value.
///         Ok(nodes)
///    })
/// }
///
/// let mut handlers = EventHandlerBag::<()>::new();
/// handlers.register_after_node_create(vec!["User".to_string()], after_user_create);
/// ```
Registers an event handler `f` to be called after a node of type `type_name` is created.
Registers an event handler ` f ` to be called after a node of type ` type_name ` is created .
pub fn register_after_node_create(
        &mut self,
        names: Vec<String>,
        f: AfterNodeEventFunc<RequestCtx>,
    ) {
        for name in names {
            if let Some(handlers) = self.after_node_create_handlers.get_mut(&name) {
                handlers.push(f);
            } else {
                self.after_node_create_handlers.insert(name, vec![f]);
            }
        }
    }
pub fn register_after_node_create ( & mut self , names : Vec < String > , f : AfterNodeEventFunc < RequestCtx > , ) { for name in names { if let Some ( handlers ) = self . after_node_create_handlers . get_mut ( & name ) { handlers . push ( f ) ; } else { self . after_node_create_handlers . insert ( name , vec ! [ f ] ) ; } } }
Registers an event handler `f` to be called after a node of type `type_name` is created.
Registers an event handler ` f ` to be called after a node of type ` type_name ` is created .
&mut self
names
Vec<String>
f
AfterNodeEventFunc<RequestCtx>
&mut self
names
Vec<String>
f
AfterNodeEventFunc<RequestCtx>
examples
None
use warpgrapher::engine::events::{eventhandlerbag, eventfacade};
None
use warpgrapher::error;
None
use warpgrapher::engine::value::value;
None
use warpgrapher::engine::objects::node;
None
use warpgrapher::juniper::boxfuture;
fn after_user_create(nodes: Vec>, ef: EventFacade<()>) -> BoxFuture>, Error>> {
Box::pin(async move {
Normally work would be done here, resulting in some new value.

let mut handlers = EventHandlerBag::<()>::new();
handlers.register_after_node_create(vec!["User".to_string()], after_user_create);
```
fn after_user_create ( nodes : Vec > ef : EventFacade< () > ) - > BoxFuture > Error >> { Box :: pin ( async move { Normally work would be done here resulting in some new value . let mut handlers = EventHandlerBag :: < () > :: new () ; handlers . register_after_node_create ( vec! [ " User " . to_string () ] after_user_create ) ; ` ` `