pub fn send_granting(
ctx: &ServiceContext,
to: Cap,
granting: Cap,
msg: &Message,
) -> Result<(), Error>Expand description
Send a message that CARRIES a capability, giving it away.
The capability MOVES (CLAUDE.md 8.5). Three things are true every time and none of them are checked for you at compile time:
- The capability must hold
GRANT, or this is refused. - On success it is no longer yours. Using it afterwards is using something you do not hold.
- On failure it stayed - reclaim the slot with
cap::removerather than leaking it.
So the result is never ignorable: it decides what you may do next.