pub fn take<S, E>(slot: usize) -> Option<S>Expand description
Take (consume) a serial port from the specified slot index.
Returns Some(S) if the slot contains a serial port of type S, None otherwise.
Note: This consumes the serial port from the slot, leaving it empty.