It depends...
There is a definition of rigid in the postal regulations. It is tied to the ability to pass along a moving belt of a certain tension around a pulley of a stated diameter. Obviously, USPS wants to automatically process things that only pay letter or large envelope rates.
There's also a provision to get a written decision on how a particular mailed piece will be charged. I'm sure it's intended for mass-mailers, but I guess you could submit a bubble pack with a chip in it and get a letter to show your local clerk each time you mail something.