pub fn new_from_state_values(hm: &[(SPPath, StateValue)]) -> SPState {
        let mut xs = HashMap::new();
        let mut v = Vec::with_capacity(hm.len());
        for (key, value) in hm.iter() {
            v.push(value.clone());
            xs.insert(key.clone(), v.len() - 1);
        }
        SPState {
            index: xs,
            values: v,
            id: Uuid::new_v4(),
        }
    }
/// Creates a new State that includes the state defined in the hashmap.
Creates a new State that includes the state defined in the hashmap.
Creates a new State that includes the state defined in the hashmap .
pub fn new_from_state_values(hm: &[(SPPath, StateValue)]) -> SPState {
        let mut xs = HashMap::new();
        let mut v = Vec::with_capacity(hm.len());
        for (key, value) in hm.iter() {
            v.push(value.clone());
            xs.insert(key.clone(), v.len() - 1);
        }
        SPState {
            index: xs,
            values: v,
            id: Uuid::new_v4(),
        }
    }
pub fn new_from_state_values ( hm : & [ ( SPPath , StateValue ) ] ) -> SPState { let mut xs = HashMap :: new ( ) ; let mut v = Vec :: with_capacity ( hm . len ( ) ) ; for ( key , value ) in hm . iter ( ) { v . push ( value . clone ( ) ) ; xs . insert ( key . clone ( ) , v . len ( ) - 1 ) ; } SPState { index : xs , values : v , id : Uuid :: new_v4 ( ) , } }
Creates a new State that includes the state defined in the hashmap.
Creates a new State that includes the state defined in the hashmap .
hm
&[(SPPath, StateValue)]