async fn unbind(&self, t: &TrackLocalContext) -> Result<()> {
        let mut bindings = self.bindings.lock().await;
        let mut idx = None;
        for (index, binding) in bindings.iter().enumerate() {
            if binding.id == t.id() {
                idx = Some(index);
                break;
            }
        }
        if let Some(index) = idx {
            bindings.remove(index);
            Ok(())
        } else {
            Err(Error::ErrUnbindFailed)
        }
    }
/// unbind implements the teardown logic when the track is no longer needed. This happens
/// because a track has been stopped.
unbind implements the teardown logic when the track is no longer needed. This happens
because a track has been stopped.
unbind implements the teardown logic when the track is no longer needed . This happens because a track has been stopped .
async fn unbind(&self, t: &TrackLocalContext) -> Result<()> {
        let mut bindings = self.bindings.lock().await;
        let mut idx = None;
        for (index, binding) in bindings.iter().enumerate() {
            if binding.id == t.id() {
                idx = Some(index);
                break;
            }
        }
        if let Some(index) = idx {
            bindings.remove(index);
            Ok(())
        } else {
            Err(Error::ErrUnbindFailed)
        }
    }
async fn unbind ( & self , t : & TrackLocalContext ) -> Result < ( ) > { let mut bindings = self . bindings . lock ( ) . await ; let mut idx = None ; for ( index , binding ) in bindings . iter ( ) . enumerate ( ) { if binding . id == t . id ( ) { idx = Some ( index ) ; break ; } } if let Some ( index ) = idx { bindings . remove ( index ) ; Ok ( ( ) ) } else { Err ( Error :: ErrUnbindFailed ) } }
unbind implements the teardown logic when the track is no longer needed.
unbind implements the teardown logic when the track is no longer needed .
&self
t
&TrackLocalContext