'Unpacks a new instance of this class from a buffer'

@classmethod
def unpack_new(cls, raw, offset=0, max_length=None):

    if ((max_length is not None) and ((max_length - offset) < cls.LENGTH)):
        raise TruncatedException()
    nh = struct.unpack_from('!B', raw, offset)[0]
    d = cls._unpack_body(raw, (offset + 1), nh, (cls.LENGTH - 1))
    offset += cls.LENGTH
    d['next_header_type'] = nh
    return (offset, cls(**d))
