pub fn reserve_channel(&mut self) -> Option<ServerChannel> {
        let next = ServerChannel::all().find(|sc| !self.allocated.contains(&sc));
        next.map(|channel| {
            self.allocated.insert(channel);
            channel
        })
    }
/// Allocates the next available server channel. Returns None if there
/// are no available channels.
Allocates the next available server channel. Returns None if there
are no available channels.
Allocates the next available server channel . Returns None if there are no available channels .
pub fn reserve_channel(&mut self) -> Option<ServerChannel> {
        let next = ServerChannel::all().find(|sc| !self.allocated.contains(&sc));
        next.map(|channel| {
            self.allocated.insert(channel);
            channel
        })
    }
pub fn reserve_channel ( & mut self ) -> Option < ServerChannel > { let next = ServerChannel :: all ( ) . find ( | sc | ! self . allocated . contains ( & sc ) ) ; next . map ( | channel | { self . allocated . insert ( channel ) ; channel } ) }
Allocates the next available server channel.
Allocates the next available server channel .
&mut self
&mut self