Thus, an advantage of this approach is that no allocation is necessary for returning the future.
But also limitation should be mentioned - the returned type must be same for all possible return values from the function. It's one type, which will be concretized by compiler. Otherwise trait object must be used.
Share this highlighthttp://www.safaribooksonline.com/a/network-programming-with/18996546/