If the officer can articulate (or manufacture later, on the stand) reasonable suspicion, which is a vague standard far below probable cause, it is a Terry stop and he can frisk you for officer safety. The supreme court majority that decided Terry v. Ohio did not adequately consider the consequences of their decision, but it's the law.
If there's anything in your pockets that feels like it might be a weapon of any kind, he can then retrieve it, even if turning your pockets inside out from the start might not be allowed.
Realistically, carrying anything larger than a sheet of paper -- like keys and a cell phone -- will mean that the officer will usually get away with rifling through your pockets.
If there's anything in your pockets that feels like it might be a weapon of any kind, he can then retrieve it, even if turning your pockets inside out from the start might not be allowed.
Realistically, carrying anything larger than a sheet of paper -- like keys and a cell phone -- will mean that the officer will usually get away with rifling through your pockets.