pub fn delete_mode(&self, mode: Mode) {
        let mut inner = self.inner.lock().unwrap();
        inner.modes.retain(|&m| m != mode);
        if inner.current_mode == Some(mode) {
            inner.current_mode = None;
        }
        if inner.preferred_mode == Some(mode) {
            inner.preferred_mode = None;
        }
    }
/// Removes a mode from the list of known modes
///
/// It will not de-advertise it from existing clients (the protocol does not
/// allow it), but it won't be advertised to now clients from now on.
Removes a mode from the list of known modes
It will not de-advertise it from existing clients (the protocol does not
allow it), but it won't be advertised to now clients from now on.
Removes a mode from the list of known modes It will not de - advertise it from existing clients ( the protocol does not allow it ) but it won ' t be advertised to now clients from now on .
pub fn delete_mode(&self, mode: Mode) {
        let mut inner = self.inner.lock().unwrap();
        inner.modes.retain(|&m| m != mode);
        if inner.current_mode == Some(mode) {
            inner.current_mode = None;
        }
        if inner.preferred_mode == Some(mode) {
            inner.preferred_mode = None;
        }
    }
pub fn delete_mode ( & self , mode : Mode ) { let mut inner = self . inner . lock ( ) . unwrap ( ) ; inner . modes . retain ( | & m | m != mode ) ; if inner . current_mode == Some ( mode ) { inner . current_mode = None ; } if inner . preferred_mode == Some ( mode ) { inner . preferred_mode = None ; } }
Removes a mode from the list of known modes
It will not de-advertise it from existing clients (the protocol does not
allow it), but it won't be advertised to now clients from now on.
Removes a mode from the list of known modes It will not de - advertise it from existing clients ( the protocol does not allow it ) but it won ' t be advertised to now clients from now on .
&self
mode
Mode
&self
mode
Mode