pub fn get_vec<T, U>(function: T) -> Vec<U> where
    T: Fn(&mut Vec<U>) -> Option<U>, 
Expand description

Gets a vector that stops at a none parameter. It is append only. It must be provided with a closure (or function) that returns an option You can get such a thing from a function that returns error using

get_vec(||{returns_error().ok()})