var searchIndex = {}; searchIndex["futures"] = {"doc":"A work-in-progress futures library for Rust.","items":[[3,"Task","futures","A structure representing one "task", or thread of execution throughout the\nlifetime of a set of futures.",null,null],[3,"TaskData","","A reference to a piece of data that's stored inside of a `Task`.",null,null],[3,"TaskNotifyData","","dox",null,null],[3,"TaskHandle","","A handle to a task that can be sent to other threads.",null,null],[3,"Collect","","A future which takes a list of futures and resolves with a vector of the\ncompleted values.",null,null],[3,"Done","","A future representing a value that is immediately ready.",null,null],[3,"Empty","","A future which is never resolved.",null,null],[3,"Failed","","A future representing a finished but erroneous computation.",null,null],[3,"Finished","","A future representing a finished successful computation.",null,null],[3,"Lazy","","A future which defers creation of the actual future until a callback is\nscheduled.",null,null],[3,"Promise","","A future representing the completion of a computation happening elsewhere in\nmemory.",null,null],[3,"Complete","","Represents the completion half of a promise through which the result of a\ncomputation is signaled.",null,null],[3,"Canceled","","Error returned from a `Promise<T>` whenever the correponding `Complete<T>`\nis dropped.",null,null],[3,"Store","","A combinator which will store some data into task-local storage.",null,null],[3,"StoreNotify","","A combinator which will store some data into task-local storage.",null,null],[3,"AndThen","","Future for the `and_then` combinator, chaining a computation onto the end of\nanother future which completes successfully.",null,null],[3,"Flatten","","Future for the `flatten` combinator, flattening a future-of-a-future to get just\nthe result of the final future.",null,null],[3,"Fuse","","A future which "fuse"s a future once it's been resolved.",null,null],[3,"Join","","Future for the `join` combinator, waiting for two futures to complete.",null,null],[3,"Map","","Future for the `map` combinator, changing the type of a future.",null,null],[3,"MapErr","","Future for the `map_err` combinator, changing the error type of a future.",null,null],[3,"OrElse","","Future for the `or_else` combinator, chaining a computation onto the end of\na future which fails with an error.",null,null],[3,"Select","","Future for the `select` combinator, waiting for one of two futures to\ncomplete.",null,null],[3,"SelectNext","","Future yielded as the second result in a `Select` future.",null,null],[3,"Then","","Future for the `then` combinator, chaining computations on the end of\nanother future regardless of its outcome.",null,null],[4,"Poll","","Possible return values from the `Future::poll` method.",null,null],[13,"NotReady","","Indicates that the future is not ready yet, ask again later.",0,null],[13,"Ok","","Indicates that the future has completed successfully, and this value is\nwhat the future completed with.",0,null],[13,"Err","","Indicates that the future has failed, and this error is what the future\nfailed with.",0,null],[5,"collect","","Creates a future which represents a collection of the results of the futures\ngiven.",null,{"inputs":[{"name":"i"}],"output":{"name":"collect"}}],[5,"done","","Creates a new "leaf future" which will resolve with the given result.",null,{"inputs":[{"name":"result"}],"output":{"name":"done"}}],[5,"empty","","Creates a future which never resolves, representing a computation that never\nfinishes.",null,{"inputs":[],"output":{"name":"empty"}}],[5,"failed","","Creates a "leaf future" from an immediate value of a failed computation.",null,{"inputs":[{"name":"e"}],"output":{"name":"failed"}}],[5,"finished","","Creates a "leaf future" from an immediate value of a finished and\nsuccessful computation.",null,{"inputs":[{"name":"t"}],"output":{"name":"finished"}}],[5,"lazy","","Creates a new future which will eventually be the same as the one created\nby the closure provided.",null,{"inputs":[{"name":"f"}],"output":{"name":"lazy"}}],[5,"promise","","Creates a new in-memory promise used to represent completing a computation.",null,null],[5,"store","","A combinator to store some data into task-local storage.",null,{"inputs":[{"name":"t"}],"output":{"name":"store"}}],[5,"store_notify","","A combinator to store some data into task-local storage.",null,{"inputs":[{"name":"t"}],"output":{"name":"storenotify"}}],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"map","","Change the success type of this `Poll` value with the closure provided",0,null],[11,"map_err","","Change the error type of this `Poll` value with the closure provided",0,null],[11,"is_not_ready","","Returns whether this is `Poll::NotReady`",0,null],[11,"is_ready","","Returns whether this is either `Poll::Ok` or `Poll::Err`",0,null],[11,"unwrap","","Unwraps this `Poll` into a `Result`, panicking if it's not ready.",0,null],[11,"from","","",0,{"inputs":[{"name":"result"}],"output":{"name":"poll"}}],[11,"clone","","",1,null],[11,"new","","Creates a new task ready to drive a future.",2,{"inputs":[],"output":{"name":"task"}}],[11,"insert","","Inserts a new piece of task-local data into this task, returning a\nreference to it.",2,null],[11,"insert_notify","","dox",2,null],[11,"get","","Get a reference to the task-local data inside this task.",2,null],[11,"get_mut","","Get a mutable reference to the task-local data inside this task.",2,null],[11,"notify","","During the `Future::schedule` method, notify to the task that a value is\nimmediately ready.",2,null],[11,"handle","","Gets a handle to this task which can be cloned to a piece of\n`Send+'static` data.",2,null],[11,"scoped","","dox",2,null],[11,"run","","Consumes this task to run a future to completion.",2,null],[11,"equivalent","","Returns whether this task handle and another point to the same task.",1,null],[11,"get","","dox",1,null],[11,"notify","","Notify the associated task that a future is ready to get polled.",1,null],[11,"clone","","",3,null],[11,"clone","","",4,null],[0,"executor","","Work in progress implementation of executors for Futures.",null,null],[3,"Inline","futures::executor","Implementation of an `Executor` which just executes everything immediately\nas soon as it's passed in.",null,null],[3,"Limited","","Implementation of an executor which executes all callbacks immediately, but\nbounds the amount of recursion to prevent blowing the stack.",null,null],[7,"DEFAULT","","The default executor, used by futures by default currently.",null,null],[8,"Executor","","Encapsulation of a value which has the ability to execute arbitrary code.",null,null],[11,"execute","","Executes the given closure `f`, perhaps on a different thread or\ndeferred to a later time.",5,null],[10,"execute_boxed","","Object-safe method of the above interface used when implementing trait\nobjects.",5,null],[8,"ExecuteCallback","","Essentially `Box<FnOnce() + Send>`, just as a trait.",null,null],[10,"call","","",6,{"inputs":[{"name":"box"}],"output":null}],[11,"execute","","",7,null],[11,"execute_boxed","","",7,null],[11,"execute","","",8,null],[11,"execute_boxed","","",8,null],[11,"poll","futures","",9,null],[11,"schedule","","",9,null],[11,"tailcall","","",9,null],[11,"poll","","",10,null],[11,"schedule","","",10,null],[11,"poll","","",11,null],[11,"schedule","","",11,null],[11,"poll","","",12,null],[11,"schedule","","",12,null],[11,"poll","","",13,null],[11,"schedule","","",13,null],[11,"poll","","",14,null],[11,"schedule","","",14,null],[11,"tailcall","","",14,null],[11,"complete","","Completes this promise with a successful result.",15,null],[11,"drop","","",15,null],[11,"fmt","","",16,null],[11,"eq","","",16,null],[11,"clone","","",16,null],[11,"poll","","",17,null],[11,"schedule","","",17,null],[11,"drop","","",17,null],[11,"poll","","",18,null],[11,"schedule","","",18,null],[11,"poll","","",19,null],[11,"schedule","","",19,null],[11,"poll","","",20,null],[11,"schedule","","",20,null],[11,"tailcall","","",20,null],[11,"poll","","",21,null],[11,"schedule","","",21,null],[11,"tailcall","","",21,null],[11,"poll","","",22,null],[11,"schedule","","",22,null],[11,"poll","","",23,null],[11,"schedule","","",23,null],[11,"tailcall","","",23,null],[11,"poll","","",24,null],[11,"schedule","","",24,null],[11,"tailcall","","",24,null],[11,"poll","","",25,null],[11,"schedule","","",25,null],[11,"tailcall","","",25,null],[11,"poll","","",26,null],[11,"schedule","","",26,null],[11,"tailcall","","",26,null],[11,"poll","","",27,null],[11,"schedule","","",27,null],[11,"tailcall","","",27,null],[11,"poll","","",28,null],[11,"schedule","","",28,null],[11,"tailcall","","",28,null],[11,"poll","","",29,null],[11,"schedule","","",29,null],[11,"tailcall","","",29,null],[0,"stream","","Asynchronous streams",null,null],[3,"Sender","futures::stream","The transmission end of a channel which is used to send values.",null,null],[3,"Receiver","","The receiving end of a channel which implements the `Stream` trait.",null,null],[3,"IterStream","","A stream which is just a shim over an underlying instance of `Iterator`.",null,null],[3,"AndThen","","A stream combinator which chains a computation onto values produced by a\nstream.",null,null],[3,"Buffered","","An adaptor for a stream of futures to execute the futures concurrently, if\npossible.",null,null],[3,"Collect","","A future which collects all of the values of a stream into a vector.",null,null],[3,"Filter","","A stream combinator used to filter the results of a stream and only yield\nsome values.",null,null],[3,"FilterMap","","A combinator used to filter the results of a stream and simultaneously map\nthem to a different type.",null,null],[3,"Flatten","","A combinator used to flatten a stream-of-streams into one long stream of\nelements.",null,null],[3,"Fold","","A future used to collect all the results of a stream into one generic type.",null,null],[3,"ForEach","","A stream combinator which executes a unit closure over each item on a\nstream.",null,null],[3,"Fuse","","A stream which "fuse"s a stream once it's terminated.",null,null],[3,"StreamFuture","","A combinator used to temporarily convert a stream into a future.",null,null],[3,"Map","","A stream combinator which will change the type of a stream from one\ntype to another.",null,null],[3,"MapErr","","A stream combinator which will change the error type of a stream from one\ntype to another.",null,null],[3,"Merge","","An adapter for merging the output of two streams.",null,null],[3,"OrElse","","A stream combinator which chains a computation onto errors produced by a\nstream.",null,null],[3,"Skip","","A stream combinator which skips a number of elements before continuing.",null,null],[3,"SkipWhile","","A stream combinator which skips elements of a stream while a predicate\nholds.",null,null],[3,"Take","","A stream combinator which returns a maximum number of elements.",null,null],[3,"Then","","A stream combinator which chains a computation onto each item produced by a\nstream.",null,null],[4,"MergedItem","","An item returned from a merge stream, which represents an item from one or\nboth of the underlying streams.",null,null],[13,"First","","An item from the first stream",30,null],[13,"Second","","An item from the second stream",30,null],[13,"Both","","Items from both streams",30,null],[5,"channel","","Creates an in-memory channel implementation of the `Stream` trait.",null,null],[5,"iter","","Converts an `Iterator` into a `Stream` which is always ready to yield the\nnext value.",null,{"inputs":[{"name":"i"}],"output":{"name":"iterstream"}}],[11,"poll","","",31,null],[11,"schedule","","",31,null],[11,"drop","","",31,null],[11,"send","","Sends a new value along this channel to the receiver.",32,null],[11,"drop","","",32,null],[11,"poll","","",33,null],[11,"schedule","","",33,null],[11,"poll","","",34,null],[11,"schedule","","",34,null],[11,"poll","","",35,null],[11,"schedule","","",35,null],[11,"poll","","",36,null],[11,"schedule","","",36,null],[11,"poll","","",37,null],[11,"schedule","","",37,null],[11,"poll","","",38,null],[11,"schedule","","",38,null],[11,"poll","","",39,null],[11,"schedule","","",39,null],[11,"poll","","",40,null],[11,"schedule","","",40,null],[11,"poll","","",41,null],[11,"schedule","","",41,null],[11,"poll","","",42,null],[11,"schedule","","",42,null],[11,"is_done","","Returns whether the underlying stream has finished or not.",42,null],[11,"poll","","",43,null],[11,"schedule","","",43,null],[11,"poll","","",44,null],[11,"schedule","","",44,null],[11,"poll","","",45,null],[11,"schedule","","",45,null],[11,"poll","","",46,null],[11,"schedule","","",46,null],[11,"poll","","",47,null],[11,"schedule","","",47,null],[11,"poll","","",48,null],[11,"schedule","","",48,null],[11,"poll","","",49,null],[11,"schedule","","",49,null],[11,"into_inner","","Consume this adaptor, returning the underlying stream.",49,null],[11,"poll","","",50,null],[11,"schedule","","",50,null],[11,"poll","","",51,null],[11,"schedule","","",51,null],[8,"Stream","","A stream of values, not all of which have been produced yet.",null,null],[16,"Item","","The type of item this stream will yield on success.",52,null],[16,"Error","","The type of error this stream may generate.",52,null],[10,"poll","","Attempt to pull out the next value of this stream, returning `None` if\nit's not ready yet.",52,null],[10,"schedule","","Schedule a task to be notified when this future is ready.",52,null],[11,"boxed","","Convenience function for turning this stream into a trait object.",52,null],[11,"into_future","","Converts this stream into a `Future`.",52,null],[11,"map","","Converts a stream of type `T` to a stream of type `U`.",52,null],[11,"map_err","","Converts a stream of error type `T` to a stream of error type `U`.",52,null],[11,"filter","","Filters the values produced by this stream according to the provided\npredicate.",52,null],[11,"filter_map","","Filters the values produced by this stream while simultaneously mapping\nthem to a different type.",52,null],[11,"then","","Chain on a computation for when a value is ready, passing the resulting\nitem to the provided closure `f`.",52,null],[11,"and_then","","Chain on a computation for when a value is ready, passing the successful\nresults to the provided closure `f`.",52,null],[11,"or_else","","Chain on a computation for when an error happens, passing the\nerroneous result to the provided closure `f`.",52,null],[11,"collect","","Collect all of the values of this stream into a vector, returning a\nfuture representing the result of that computation.",52,null],[11,"fold","","Execute an accumulating computation over a stream, collecting all the\nvalues into one final result.",52,null],[11,"flatten","","Flattens a stream of streams into just one continuous stream.",52,null],[11,"skip_while","","Skip elements on this stream while the predicate provided resolves to\n`true`.",52,null],[11,"for_each","","",52,null],[11,"take","","Creates a new stream of at most `amt` items.",52,null],[11,"skip","","Creates a new stream which skips `amt` items of the underlying stream.",52,null],[11,"fuse","","Fuse a stream such that `poll`/`schedule` will never again be called\nonce it has terminated (signaled emptyness or an error).",52,null],[11,"buffered","","An adaptor for creating a buffered list of pending futures.",52,null],[11,"merge","","An adapter for merging the output of two streams.",52,null],[8,"Future","futures","Trait for types which represent a placeholder of a value that will become\navailable at possible some later point in time.",null,null],[16,"Item","","The type of value that this future will resolved with if it is\nsuccessful.",53,null],[16,"Error","","The type of error that this future will resolve with if it fails in a\nnormal fashion.",53,null],[10,"poll","","Query this future to see if its value has become available.",53,null],[10,"schedule","","Schedule a task to be notified when this future is ready.",53,null],[11,"tailcall","","Perform tail-call optimization on this future.",53,null],[11,"boxed","","Convenience function for turning this future into a trait object.",53,null],[11,"map","","Map this future's result to a different type, returning a new future of\nthe resulting type.",53,null],[11,"map_err","","Map this future's error to a different error, returning a new future.",53,null],[11,"then","","Chain on a computation for when a future finished, passing the result of\nthe future to the provided closure `f`.",53,null],[11,"and_then","","Execute another future after this one has resolved successfully.",53,null],[11,"or_else","","Execute another future after this one has resolved with an error.",53,null],[11,"select","","Waits for either one of two futures to complete.",53,null],[11,"join","","Joins the result of two futures, waiting for them both to complete.",53,null],[11,"flatten","","Flatten the execution of this future when the successful result of this\nfuture is itself another future.",53,null],[11,"fuse","","Fuse a future such that `poll` will never again be called once it has\nreturned a success.",53,null],[11,"forget","","Consume this future and allow it to execute without cancelling it.",53,null],[8,"IntoFuture","","Class of types which can be converted themselves into a future.",null,null],[16,"Future","","The future that this type can be converted into.",54,null],[16,"Item","","The item that the future may resolve with.",54,null],[16,"Error","","The error that the future may resolve with.",54,null],[10,"into_future","","Consumes this object and produces a future.",54,null],[14,"try_poll!","","",null,null]],"paths":[[4,"Poll"],[3,"TaskHandle"],[3,"Task"],[3,"TaskData"],[3,"TaskNotifyData"],[8,"Executor"],[8,"ExecuteCallback"],[3,"Inline"],[3,"Limited"],[3,"Collect"],[3,"Done"],[3,"Empty"],[3,"Failed"],[3,"Finished"],[3,"Lazy"],[3,"Complete"],[3,"Canceled"],[3,"Promise"],[3,"Store"],[3,"StoreNotify"],[3,"AndThen"],[3,"Flatten"],[3,"Fuse"],[3,"Join"],[3,"Map"],[3,"MapErr"],[3,"OrElse"],[3,"Select"],[3,"SelectNext"],[3,"Then"],[4,"MergedItem"],[3,"Receiver"],[3,"Sender"],[3,"IterStream"],[3,"AndThen"],[3,"Buffered"],[3,"Collect"],[3,"Filter"],[3,"FilterMap"],[3,"Flatten"],[3,"Fold"],[3,"ForEach"],[3,"Fuse"],[3,"StreamFuture"],[3,"Map"],[3,"MapErr"],[3,"Merge"],[3,"OrElse"],[3,"Skip"],[3,"SkipWhile"],[3,"Take"],[3,"Then"],[8,"Stream"],[8,"Future"],[8,"IntoFuture"]]}; initSearch(searchIndex);