pub fn with_capacity(head: H, cap: usize) -> Self {
        let layout = Self::get_layout(cap);
        let bytes_ptr = unsafe { alloc(layout) };
        let mut ptr = NonNull::new(bytes_ptr as *mut Pair<H, MaybeUninit<T>>).unwrap();
        unsafe { ptr::write(&mut ptr.as_mut().0 as *mut H, head) }
        Self { ptr, len: 0, cap }
    }
/// Creates an empty `HeaderVec` with the specified capacity.
Creates an empty `HeaderVec` with the specified capacity.
Creates an empty ` HeaderVec ` with the specified capacity .
pub fn with_capacity(head: H, cap: usize) -> Self {
        let layout = Self::get_layout(cap);
        let bytes_ptr = unsafe { alloc(layout) };
        let mut ptr = NonNull::new(bytes_ptr as *mut Pair<H, MaybeUninit<T>>).unwrap();
        unsafe { ptr::write(&mut ptr.as_mut().0 as *mut H, head) }
        Self { ptr, len: 0, cap }
    }
pub fn with_capacity ( head : H , cap : usize ) -> Self { let layout = Self :: get_layout ( cap ) ; let bytes_ptr = unsafe { alloc ( layout ) } ; let mut ptr = NonNull :: new ( bytes_ptr as * mut Pair < H , MaybeUninit < T > > ) . unwrap ( ) ; unsafe { ptr :: write ( & mut ptr . as_mut ( ) . 0 as * mut H , head ) } Self { ptr , len : 0 , cap } }
Creates an empty `HeaderVec` with the specified capacity.
Creates an empty ` HeaderVec ` with the specified capacity .
head
H
cap
usize