Add RankMask and CardMask types and creation functions.