Creatures that are immune to non-magical slashing/piercing/bludgeoning damage, like wererats, are not immune to the magical slashing damage of Cloud of Daggers. Everything about the daggers in that cloud is magical: they are conjured, they are moving via an invisible force, they do not inflict damage until the victim begins its turn, etc. The slashing damage from those daggers is 100% magical. Creatures that are resistant to slashing/piercing/bludgeoning damage, like raging barbarians, are resistant to Cloud of Daggers unless it is specifically stated that the damage has to be non-magical.