buffer generic trait impl