core-dev 0.0.1

core-dev library is an utility library for rust. It contains a lot of useful functions and APIs to speed up development cycle.
Documentation
pub trait All_Any_String {
    fn all<F>(&self, closure: F) -> bool
    where
        F: Fn(&String) -> bool;
    fn any<F>(&self, closure: F) -> bool
    where
        F: Fn(&String) -> bool;
}

impl All_Any_String for Vec<String> {
    fn all<F>(&self, closure: F) -> bool
    where
        F: Fn(&String) -> bool, {
        for item in self.iter() {
            if !closure(item) {
                return false;
            }
        }
        true
    }

    fn any<F>(&self, closure: F) -> bool
    where
        F: Fn(&String) -> bool, {
        for item in self.iter() {
            if closure(item) {
                return true;
            }
        }
        false
    }
}


pub trait All_Any_Str {
    fn all<F>(&self, closure: F) -> bool
    where
        F: Fn(&str) -> bool;
    fn any<F>(&self, closure: F) -> bool
    where
        F: Fn(&str) -> bool;
}

impl All_Any_Str for Vec<&str> {
    fn all<F>(&self, closure: F) -> bool
    where
        F: Fn(&str) -> bool, {
        for item in self.iter() {
            if !closure(*item) {
                return false;
            }
        }
        true
    }

    fn any<F>(&self, closure: F) -> bool
    where
        F: Fn(&str) -> bool, {
        for item in self.iter() {
            if closure(item) {
                return true;
            }
        }
        false
    }
}