pub fn new(
        mut destination_conn_id_limit: usize, initial_scid: &ConnectionId,
        initial_path_id: usize, reset_token: Option<u128>,
    ) -> ConnectionIdentifiers {
        // It must be at least 2.
        if destination_conn_id_limit < 2 {
            destination_conn_id_limit = 2;
        }

        // Initially, the limit of active source connection IDs is 2.
        let source_conn_id_limit = 2;

        // Record the zero-length SCID status.
        let zero_length_scid = initial_scid.is_empty();

        let initial_scid =
            ConnectionId::from_ref(initial_scid.as_ref()).into_owned();

        // We need to track up to (2 * source_conn_id_limit - 1) source
        // Connection IDs when the host wants to force their renewal.
        let scids = BoundedNonEmptyConnectionIdVecDeque::new(
            2 * source_conn_id_limit - 1,
            ConnectionIdEntry {
                cid: initial_scid,
                seq: 0,
                reset_token,
                path_id: Some(initial_path_id),
            },
        );

        let dcids = BoundedNonEmptyConnectionIdVecDeque::new(
            destination_conn_id_limit,
            ConnectionIdEntry {
                cid: ConnectionId::default(),
                seq: 0,
                reset_token: None,
                path_id: Some(initial_path_id),
            },
        );

        // Because we already inserted the initial SCID.
        let next_scid_seq = 1;
        ConnectionIdentifiers {
            scids,
            dcids,
            retired_scids: VecDeque::new(),
            next_scid_seq,
            source_conn_id_limit,
            zero_length_scid,
            ..Default::default()
        }
    }
/// Creates a new `ConnectionIdentifiers` with the specified destination
/// connection ID limit and initial source Connection ID. The destination
/// Connection ID is set to the empty one.
Creates a new `ConnectionIdentifiers` with the specified destination
connection ID limit and initial source Connection ID. The destination
Connection ID is set to the empty one.
Creates a new ` ConnectionIdentifiers ` with the specified destination connection ID limit and initial source Connection ID . The destination Connection ID is set to the empty one .
pub fn new(
        mut destination_conn_id_limit: usize, initial_scid: &ConnectionId,
        initial_path_id: usize, reset_token: Option<u128>,
    ) -> ConnectionIdentifiers {
        // It must be at least 2.
        if destination_conn_id_limit < 2 {
            destination_conn_id_limit = 2;
        }
        // Initially, the limit of active source connection IDs is 2.
        let source_conn_id_limit = 2;
        // Record the zero-length SCID status.
        let zero_length_scid = initial_scid.is_empty();
        let initial_scid =
            ConnectionId::from_ref(initial_scid.as_ref()).into_owned();
        // We need to track up to (2 * source_conn_id_limit - 1) source
        // Connection IDs when the host wants to force their renewal.
        let scids = BoundedNonEmptyConnectionIdVecDeque::new(
            2 * source_conn_id_limit - 1,
            ConnectionIdEntry {
                cid: initial_scid,
                seq: 0,
                reset_token,
                path_id: Some(initial_path_id),
            },
        );
        let dcids = BoundedNonEmptyConnectionIdVecDeque::new(
            destination_conn_id_limit,
            ConnectionIdEntry {
                cid: ConnectionId::default(),
                seq: 0,
                reset_token: None,
                path_id: Some(initial_path_id),
            },
        );
        // Because we already inserted the initial SCID.
        let next_scid_seq = 1;
        ConnectionIdentifiers {
            scids,
            dcids,
            retired_scids: VecDeque::new(),
            next_scid_seq,
            source_conn_id_limit,
            zero_length_scid,
            ..Default::default()
        }
    }
pub fn new ( mut destination_conn_id_limit : usize , initial_scid : & ConnectionId , initial_path_id : usize , reset_token : Option < u128 > , ) -> ConnectionIdentifiers { // It must be at least 2. if destination_conn_id_limit < 2 { destination_conn_id_limit = 2 ; } // Initially, the limit of active source connection IDs is 2. let source_conn_id_limit = 2 ; // Record the zero-length SCID status. let zero_length_scid = initial_scid . is_empty ( ) ; let initial_scid = ConnectionId :: from_ref ( initial_scid . as_ref ( ) ) . into_owned ( ) ; // We need to track up to (2 * source_conn_id_limit - 1) source // Connection IDs when the host wants to force their renewal. let scids = BoundedNonEmptyConnectionIdVecDeque :: new ( 2 * source_conn_id_limit - 1 , ConnectionIdEntry { cid : initial_scid , seq : 0 , reset_token , path_id : Some ( initial_path_id ) , } , ) ; let dcids = BoundedNonEmptyConnectionIdVecDeque :: new ( destination_conn_id_limit , ConnectionIdEntry { cid : ConnectionId :: default ( ) , seq : 0 , reset_token : None , path_id : Some ( initial_path_id ) , } , ) ; // Because we already inserted the initial SCID. let next_scid_seq = 1 ; ConnectionIdentifiers { scids , dcids , retired_scids : VecDeque :: new ( ) , next_scid_seq , source_conn_id_limit , zero_length_scid , .. Default :: default ( ) } }
Creates a new `ConnectionIdentifiers` with the specified destination
connection ID limit and initial source Connection ID.
Creates a new ` ConnectionIdentifiers ` with the specified destination connection ID limit and initial source Connection ID .
destination_conn_id_limit
usize
initial_scid
&ConnectionId
initial_path_id
usize
reset_token
Option<u128>
destination_conn_id_limit
usize
initial_scid
&ConnectionId
initial_path_id
usize
reset_token
Option<u128>