Both belongs to the part of speech 'determinative'. In terms of their function, most certainly determiners can be quantifiers; leaving aside the interrogatives, all the indefinite markers (each, some, much, more etc.) have to do with quantification, and among the definite markers all and both are also quantificational.