var searchIndex = {}; searchIndex["asynchronous"] = {"doc":"A **promise** based asynchronous library","items":[[3,"Deferred","asynchronous","Stores a function and delays its execution until it's transform to a promise.\nT : Type of value returned\nE : Type of error returned",null,null],[3,"Promise","","Stores a result of previous execution tasks.\nT : Type of value returned\nE : Type of error returned",null,null],[3,"EventLoopHandler","","Event Loop wrapper that can be cloned to pass through threads",null,null],[3,"EventLoop","","Executes a task in background collecting events from other threads",null,null],[4,"ControlFlow","","Different possibilities for asynchronous treatment of vectors",null,null],[13,"Series","","Executes one after each other. Stops execution if one fails.",0,null],[13,"Parallel","","Executes all tasks at the same time",0,null],[13,"ParallelLimit","","Executes all tasks but only **usize** tasks running at the same time",0,null],[13,"ParallelCPUS","","Executes all tasks but only **NumberCpus** tasks running at the same time",0,null],[4,"Emit","","Enum representing type of Emit in loops",null,null],[13,"Event","","Generates a new event",1,null],[13,"Continue","","Continues the loop",1,null],[13,"Stop","","Stops the loop",1,null],[11,"new","","Create a new task in deferred.",2,{"inputs":[{"name":"f"}],"output":{"name":"deferred"}}],[11,"sync","","Syncronizes the execution with the caller, and returns its value.",2,null],[11,"then","","Executes only one of the two functions received depending on the result of the previous task deferred (Ok or Err).\nReturns a new Deferred",2,null],[11,"chain","","The same functionality as **then**, but wraps the result in only one function",2,null],[11,"success","","Executes a new task if the result of the previous promise is Ok. It may return a new type in a correct result (Ok),\nbut it must return the same type of error of its previous promise.",2,null],[11,"fail","","Executes a new task if the result of the previous promise is Err. It may return a new type in a correct result (Ok),\nbut it must return the same type of error of its previous promise.",2,null],[11,"finally","","Executes one function with the result of the previous deferred.\nIt doesn't return anything and it's completly asynchronous.",2,null],[11,"finally_sync","","Executes one function with the result of the previous deferred.\nIt doesn't return anything, but it's synchronized with the caller",2,null],[11,"to_promise","","Executes the task stored and returns a Promise",2,null],[11,"vec_to_promise","","Executes a vector of tasks and returns a Promise with a vector of values in case that all tasks ended ok.\nIf there's one or more tasks with error, the promise fails and returns a vector with all the Results.",2,{"inputs":[{"name":"vec"},{"name":"controlflow"}],"output":{"name":"promise"}}],[11,"first_to_promise","","Executes a vector of tasks and returns a Promise with a vector of the first **num_first** tasks that return Ok.\nIf the **wait** parameter is **true**, the promise waits for all tasks that are running at that moment.\nIf it's **false**, the promise returns once reaches the **num_first** tasks with Ok.\nIf it's not possible achieve this number, the promise fails and returns a vector with all the Results.",2,{"inputs":[{"name":"usize"},{"name":"bool"},{"name":"vec"},{"name":"controlflow"}],"output":{"name":"promise"}}],[11,"new","","Execute a task inmediatly and returns its Promise.",3,{"inputs":[{"name":"f"}],"output":{"name":"promise"}}],[11,"sync","","Syncronizes the execution with the caller, and returns its value.",3,null],[11,"all","","Creates a new promise with the result of all other Promises in the vector.",3,{"inputs":[{"name":"vec"}],"output":{"name":"promise"}}],[11,"then","","Executes only one of the two functions received depending on the result of the previous promise (Ok or Err).\nReturns a new Promise",3,null],[11,"chain","","The same functionality as **then**, but wraps the result in only one function",3,null],[11,"success","","Executes a new task if the result of the previous promise is Ok. It may return a new type in a correct result (Ok),\nbut it must return the same type of error of its previous promise.",3,null],[11,"fail","","Executes a new task if the result of the previous promise is Err. It may return a new type in a correct result (Ok),\nbut it must return the same type of error of its previous promise.",3,null],[11,"finally","","Executes one function with the result of the previous promise.\nIt doesn't return anything and it's completly asynchronous.",3,null],[11,"finally_sync","","Executes one function with the result of the previous promise.\nIt doesn't return anything, but it's synchronized with the caller",3,null],[11,"clone","","",4,null],[11,"emit","","Triggers an event "Ev" once. Returns the same event if the event loop is not active.",4,null],[11,"emit_until","","Triggers an event "Ev" until the return of the "clousure" is None",4,null],[11,"is_active","","Returns true if the event loop is running",4,null],[11,"finish","","Finishes the event loop immediately.",4,null],[11,"finish_in_ms","","Finishes the event loop in N milliseconds",4,null],[11,"new","","Creates a new Event Loop and collects all the events into a vector",5,{"inputs":[],"output":{"name":"eventloop"}}],[11,"on","","Creates a new Event Loop and parses all the events produced",5,{"inputs":[{"name":"f"}],"output":{"name":"eventloop"}}],[11,"on_managed","","Creates a new Event Loop, parses all the events produced and collects what you want into a vector",5,{"inputs":[{"name":"f"}],"output":{"name":"eventloop"}}],[11,"emit","","Triggers an event "Ev" once. Returns the same event if the event loop is not active.",5,null],[11,"emit_until","","Triggers an event "Ev" until the return of the "clousure" is None",5,null],[11,"finish","","Finishes the event loop immediately.",5,null],[11,"finish_in_ms","","Finishes the event loop in N milliseconds",5,null],[11,"is_active","","Returns true if the event loop is running",5,null],[11,"get_handler","","Returns a handler to Event Emitter",5,null],[11,"to_promise","","Once the event loop is finished, the promise collects the results.",5,null]],"paths":[[4,"ControlFlow"],[4,"Emit"],[3,"Deferred"],[3,"Promise"],[3,"EventLoopHandler"],[3,"EventLoop"]]}; initSearch(searchIndex);