pub fn try_send(&mut self, packet: P) -> Result<(), IncomingTrySendError<P>> {
        let channel = packet[0];
        let incoming = self
            .incoming
            .get_mut(&channel)
            .ok_or(IncomingError::UnknownPacketChannel)?;

        let mux_packet_len = (packet.len() - 1) as u64;
        incoming.sender.try_send(MuxPacket(packet)).map_err(|e| {
            if e.is_full() {
                IncomingTrySendError::IsFull(e.into_inner().0)
            } else {
                IncomingError::ChannelReceiverDropped.into()
            }
        })?;
        incoming.statistics.mark_incoming_packet(mux_packet_len);

        Ok(())
    }
/// Attempt to send the given packet to the appropriate multiplexed channel without blocking.
///
/// If a normal error occurs, returns `IncomingError::Error`, if the destination channel buffer
/// is full, returns `IncomingTrySendError::IsFull`.
Attempt to send the given packet to the appropriate multiplexed channel without blocking.
If a normal error occurs, returns `IncomingError::Error`, if the destination channel buffer
is full, returns `IncomingTrySendError::IsFull`.
Attempt to send the given packet to the appropriate multiplexed channel without blocking . If a normal error occurs returns ` IncomingError :: Error ` if the destination channel buffer is full returns ` IncomingTrySendError :: IsFull ` .
pub fn try_send(&mut self, packet: P) -> Result<(), IncomingTrySendError<P>> {
        let channel = packet[0];
        let incoming = self
            .incoming
            .get_mut(&channel)
            .ok_or(IncomingError::UnknownPacketChannel)?;
        let mux_packet_len = (packet.len() - 1) as u64;
        incoming.sender.try_send(MuxPacket(packet)).map_err(|e| {
            if e.is_full() {
                IncomingTrySendError::IsFull(e.into_inner().0)
            } else {
                IncomingError::ChannelReceiverDropped.into()
            }
        })?;
        incoming.statistics.mark_incoming_packet(mux_packet_len);
        Ok(())
    }
pub fn try_send ( & mut self , packet : P ) -> Result < ( ) , IncomingTrySendError < P > > { let channel = packet [ 0 ] ; let incoming = self . incoming . get_mut ( & channel ) . ok_or ( IncomingError :: UnknownPacketChannel ) ? ; let mux_packet_len = ( packet . len ( ) - 1 ) as u64 ; incoming . sender . try_send ( MuxPacket ( packet ) ) . map_err ( | e | { if e . is_full ( ) { IncomingTrySendError :: IsFull ( e . into_inner ( ) . 0 ) } else { IncomingError :: ChannelReceiverDropped . into ( ) } } ) ? ; incoming . statistics . mark_incoming_packet ( mux_packet_len ) ; Ok ( ( ) ) }
Attempt to send the given packet to the appropriate multiplexed channel without blocking.
Attempt to send the given packet to the appropriate multiplexed channel without blocking .
&mut self
packet
P
&mut self
packet
P