I would watch the nuance here. A vector or deviation off the SID/STAR would cancel published altitudes and speeds. However, a clearance direct another point along the SID/STAR would not necessarily cancel any published restrictions at/beyond that point. There may be slight differences in this interpretation depending on the facility SOP.
7110.65 5-6-2.
But doing that also introduces another issue altogether, especially with speed restrictions. For example, if I'm on the MISEN.RNDRZ2 into Las Vegas, I have a crossing restriction and speed restriction at RNDRZ at at/below FL190 and at/above 13000, and at 250kts. If I was given "cleared direct TWAFL", I am to proceed directly to TWAFL, which has me omitting the crossing restriction of at/above 9000 and at 210kts at REDQN. TWAFL is still on the STAR. Because of that, I no longer have any profile to descend via, and am to maintain the altitude and speed given by ATC until I am given the call to "descend via" again. That "cleared direct" at RNDRZ canceled the published restriction at REDQN.
5-6-2.c and 5-6-2.f apply. Regardless, a reason for the deviation needs to be given, as you are taking them off the profiled descent, as I mentioned before.
BL.