pub fn new(tlv_type: u32, tlv_value: Vec<u32>) -> Self {
        let mut data = vec![0; 2];
        data[Self::TYPE_OFFSET] = tlv_type;
        data[Self::LEN_OFFSET] = (tlv_value.len() * size_of::<u32>()) as u32;
        data.extend(tlv_value.iter());
        Self { data }
    }
/// Initializes a `TLV` by giving the tlv type and tlv value.
Initializes a `TLV` by giving the tlv type and tlv value.
Initializes a ` TLV ` by giving the tlv type and tlv value .
pub fn new(tlv_type: u32, tlv_value: Vec<u32>) -> Self {
        let mut data = vec![0; 2];
        data[Self::TYPE_OFFSET] = tlv_type;
        data[Self::LEN_OFFSET] = (tlv_value.len() * size_of::<u32>()) as u32;
        data.extend(tlv_value.iter());
        Self { data }
    }
pub fn new ( tlv_type : u32 , tlv_value : Vec < u32 > ) -> Self { let mut data = vec ! [ 0 2 ] ; data [ Self :: TYPE_OFFSET ] = tlv_type ; data [ Self :: LEN_OFFSET ] = ( tlv_value . len ( ) * size_of :: < u32 > ( ) ) as u32 ; data . extend ( tlv_value . iter ( ) ) ; Self { data } }
Initializes a `TLV` by giving the tlv type and tlv value.
Initializes a ` TLV ` by giving the tlv type and tlv value .
tlv_type
u32
tlv_value
Vec<u32>
tlv_type
u32
tlv_value
Vec<u32>