pub fn take_transition(&mut self, name: &str) -> Transition {
        if let Some(idx) = self.transitions.iter().position(|t| t.path().leaf() == name) {
            return self.transitions.swap_remove(idx);
        } else {
            panic!("could not find transition {} in resource {}", name, self.path());
        }
    }
/// Take a transition out from the resource in order to synchronize it with something else.
Take a transition out from the resource in order to synchronize it with something else.
Take a transition out from the resource in order to synchronize it with something else .
pub fn take_transition(&mut self, name: &str) -> Transition {
        if let Some(idx) = self.transitions.iter().position(|t| t.path().leaf() == name) {
            return self.transitions.swap_remove(idx);
        } else {
            panic!("could not find transition {} in resource {}", name, self.path());
        }
    }
pub fn take_transition ( & mut self , name : & str ) -> Transition { if let Some ( idx ) = self . transitions . iter ( ) . position ( | t | t . path ( ) . leaf ( ) == name ) { return self . transitions . swap_remove ( idx ) ; } else { panic ! ( " " name self path ( ) ) ; } }
Take a transition out from the resource in order to synchronize it with something else.
Take a transition out from the resource in order to synchronize it with something else .
&mut self
name
&str