Thanks for the advice!
How long would be good?
I used some gloves and flipped him over a few times (in the bathroom so not a space he's normally in) and I know it stressed him out and feel bad but I would much rather go through bonding and gaining his trust again than have him think he can get away with biting. I'll admit I have much more experience with dogs than rats so I'm not sure if the same kind of thing works but I know they both pin for dominance and I needed to do something right away. He was tired at the end (obviously) but he climbed up on my shoulder and was very nuzzly afterwards so I just hope that means he isn't too stressed. He did take some treats from me after I put him back in his play area before returning him to his cage.
I feel awful about stressing him but he's also got a blood stain on his stomach from biting through the glove so I felt like I had to do something that would let him know that was not okay and that if anyone is dominant it is me in no uncertain terms. Again, that's from dog training though so I just really worry that there's something significant I fucked up...
He's sleeping in his hammock now and I'm just hoping things are more normal tomorrow. It's the length of time he spent attacking that worries me most. If it was one bite I would think nothing of it, but he kept trying for a solid couple of minutes, going for my arm or leg when my hand wasn't there. I assume he wasn't using full bite strength at least since he never broke the skin anywhere but fingers or knuckles which I know he could have, and nothing seems too deep, just enough to bleed a lot and hurt.