You can get the assignment type as 1 or 0 - 1 is inherited I think.
There's a table that tells you but its a 'system' table and is not guaranteed to be the same between versions. I think its MX_STRUCTURE_ROOT. You can query it easily enough and it gets rebuilt every time a privilege is assigned so it will always be up to date. Just be aware its not a 'version safe' solution.
Someone mentioned making it a standard component given the number of people that have asked for it. Not sure the timeframes on that though
Peter