I have gotten a PatType
from an FnArg::Typed(my_pat_type)
which I got by extracting the inputs from a function signature in a procedural macro.
My problem is that I need a concise way to check if my PatType
is in any way mutable or not, without going into the specific information.
I tried checking the documentation for a method, or something to tell me if a PatType
is mutable, but I instead found the pat
and ty
fields, which are themselves enum
's that I don't really want to match against to get the specific information, and check mutability there.
I tried asking ChatGPT but it gave me a huge mess of spaghetti code that does match against those enum
's