pub fn retire_scid(
        &mut self, seq: u64, pkt_dcid: &ConnectionId,
    ) -> Result<Option<usize>> {
        if seq >= self.next_scid_seq {
            return Err(Error::InvalidState);
        }

        let pid = if let Some(e) = self.scids.remove(seq)? {
            if e.cid == *pkt_dcid {
                return Err(Error::InvalidState);
            }

            // Notifies the application.
            self.retired_scids.push_back(e.cid);

            // Retiring this SCID may increase the retire prior to.
            let lowest_scid_seq = self.lowest_usable_scid_seq()?;
            self.retire_prior_to = lowest_scid_seq;

            e.path_id
        } else {
            None
        };

        Ok(pid)
    }
/// Retires the Source Connection ID having the provided sequence number.
///
/// In case the retired Connection ID is the same as the one used by the
/// packet requesting the retiring, or if the retired sequence number is
/// greater than any previously advertised sequence numbers, it returns an
/// [`InvalidState`].
///
/// Returns the path ID that was associated to the retired CID, if any.
///
/// [`InvalidState`]: enum.Error.html#InvalidState
Retires the Source Connection ID having the provided sequence number.
In case the retired Connection ID is the same as the one used by the
packet requesting the retiring, or if the retired sequence number is
greater than any previously advertised sequence numbers, it returns an
[`InvalidState`].

Returns the path ID that was associated to the retired CID, if any.


Retires the Source Connection ID having the provided sequence number . In case the retired Connection ID is the same as the one used by the packet requesting the retiring or if the retired sequence number is greater than any previously advertised sequence numbers it returns an [ ` InvalidState ` ] . Returns the path ID that was associated to the retired CID if any .
pub fn retire_scid(
        &mut self, seq: u64, pkt_dcid: &ConnectionId,
    ) -> Result<Option<usize>> {
        if seq >= self.next_scid_seq {
            return Err(Error::InvalidState);
        }
        let pid = if let Some(e) = self.scids.remove(seq)? {
            if e.cid == *pkt_dcid {
                return Err(Error::InvalidState);
            }
            // Notifies the application.
            self.retired_scids.push_back(e.cid);
            // Retiring this SCID may increase the retire prior to.
            let lowest_scid_seq = self.lowest_usable_scid_seq()?;
            self.retire_prior_to = lowest_scid_seq;
            e.path_id
        } else {
            None
        };
        Ok(pid)
    }
pub fn retire_scid ( & mut self , seq : u64 , pkt_dcid : & ConnectionId , ) -> Result < Option < usize > > { if seq >= self . next_scid_seq { return Err ( Error :: InvalidState ) ; } let pid = if let Some ( e ) = self . scids . remove ( seq ) ? { if e . cid == * pkt_dcid { return Err ( Error :: InvalidState ) ; } // Notifies the application. self . retired_scids . push_back ( e . cid ) ; // Retiring this SCID may increase the retire prior to. let lowest_scid_seq = self . lowest_usable_scid_seq ( ) ? ; self . retire_prior_to = lowest_scid_seq ; e . path_id } else { None } ; Ok ( pid ) }
Retires the Source Connection ID having the provided sequence number.
Retires the Source Connection ID having the provided sequence number .
&mut self
seq
u64
pkt_dcid
&ConnectionId
&mut self
seq
u64
pkt_dcid
&ConnectionId