pub fn bind<T: Clone + PartialEq + Send + Sync + 'static>(
        &mut self,
        global_state: &crate::Binding<T>,
    ) {
        if !self.global_bindings.contains_key(&self.current_id) {
            self.global_bindings.insert(self.current_id, vec![]);
        }

        let global_binding_ids = self.global_bindings.get_mut(&self.current_id).unwrap();

        if !global_binding_ids.contains(&global_state.id) {
            let lifetime = Self::create_lifetime(&global_state, &self.widget_manager, self.current_id);
            Self::insert_state_lifetime(
                &mut self.widget_state_lifetimes,
                self.current_id,
                global_state.id,
                lifetime,
            );
            global_binding_ids.push(global_state.id);
        }
    }
/// Binds some global state to the current widget.
Binds some global state to the current widget.
Binds some global state to the current widget .
pub fn bind<T: Clone + PartialEq + Send + Sync + 'static>(
        &mut self,
        global_state: &crate::Binding<T>,
    ) {
        if !self.global_bindings.contains_key(&self.current_id) {
            self.global_bindings.insert(self.current_id, vec![]);
        }
        let global_binding_ids = self.global_bindings.get_mut(&self.current_id).unwrap();
        if !global_binding_ids.contains(&global_state.id) {
            let lifetime = Self::create_lifetime(&global_state, &self.widget_manager, self.current_id);
            Self::insert_state_lifetime(
                &mut self.widget_state_lifetimes,
                self.current_id,
                global_state.id,
                lifetime,
            );
            global_binding_ids.push(global_state.id);
        }
    }
pub fn bind < T : Clone + PartialEq + Send + Sync + ' static > ( & mut self , global_state : & crate :: Binding < T > , ) { if ! self . global_bindings . contains_key ( & self . current_id ) { self . global_bindings . insert ( self . current_id , vec ! [ ] ) ; } let global_binding_ids = self . global_bindings . get_mut ( & self . current_id ) . unwrap ( ) ; if ! global_binding_ids . contains ( & global_state . id ) { let lifetime = Self :: create_lifetime ( & global_state , & self . widget_manager , self . current_id ) ; Self :: insert_state_lifetime ( & mut self . widget_state_lifetimes , self . current_id , global_state . id , lifetime , ) ; global_binding_ids . push ( global_state . id ) ; } }
Binds some global state to the current widget.
Binds some global state to the current widget .
&mut self
global_state
&crate::Binding<T>
&mut self
global_state
&crate::Binding<T>