/// Find the CallHeld state based on all calls in `iter`.
Find the CallHeld state based on all calls in `iter`.
Find the CallHeld state based on all calls in ` iter ` .
pub fn find(mut iter: impl Iterator<Item = CallState> + Clone) -> Self {
        let any_held = iter.clone().any(|state| state == CallState::OngoingHeld);
        let any_active = iter.any(|state| state == CallState::OngoingActive);
        match (any_held, any_active) {
            (true, false) => CallHeld::Held,
            (true, true) => CallHeld::HeldAndActive,
            (false, _) => CallHeld::None,
        }
    }
pub fn find ( mut iter : impl Iterator < Item = CallState > + Clone ) -> Self { let any_held = iter . clone ( ) . any ( | state | state == CallState :: OngoingHeld ) ; let any_active = iter . any ( | state | state == CallState :: OngoingActive ) ; match ( any_held , any_active ) { ( true , false ) => CallHeld :: Held , ( true , true ) => CallHeld :: HeldAndActive , ( false , _ ) => CallHeld :: None , } }
Find the CallHeld state based on all calls in `iter`.
Find the CallHeld state based on all calls in ` iter ` .
iter
impl Iterator<Item = CallState> + Clone