Colregs Rule 3 sets a very high bar on what is a 'vessel restricted in ability to maneuver", since this would change the right-of-way rules and the other vessel may not know the situation:
Definition - Restricted in Ability to Maneuver
So there's no way a main-raiser, even with a stuck halyard, will meet that standard so don't go thinking you have right of way, you don't. that's why it's "courtesy", since there are so many things do inhibit (but not legally restrict per the Rule) your ability to change course, and a perceptive and courteous sailor (note that's two things, it takes both) will not insist on his right of way per the Rules.
And also, the rules require a day shape or restricted red/white/red lights to show the world you're restricted.
Or you could get modern and use the radio to let traffic know you need room. That's what a "Securite" call is designed for. I doubt anyone listening would decline to cut you a break.
We had a big, big discussion about this as applied to vessels "fishing" and whether they're "Restricted" or just, uh, sorta restricted but not thereby a Stand-On vessel. I think it was titled, "No, you are NOT fishing" or words to that effect. "you could look it up", as Yogi Berra (or was it Casey Stengel) would say.