CoercedSlot
From Erights
(Difference between revisions)
Kevin Reid (Talk | contribs) |
Kevin Reid (Talk | contribs) (correct attempt/1 doc to what should be, not what is implemented) |
||
Line 11: | Line 11: | ||
{{maker msgdoc|attempt|1|<var>guard</var>, <var>value</var>|[[any]]<nowiki>[</nowiki>[[CoercedSlot]]|[[FinalSlot]]<nowiki>]</nowiki>}} | {{maker msgdoc|attempt|1|<var>guard</var>, <var>value</var>|[[any]]<nowiki>[</nowiki>[[CoercedSlot]]|[[FinalSlot]]<nowiki>]</nowiki>}} | ||
- | As run/1 unless the guard ejects, in which case | + | As run/1 unless the guard ejects, in which case the resulting slot's guard will be [[Guard-based auditing|LostApproval]][<var>guard</var>]. |
==Protocol== | ==Protocol== |
Revision as of 04:13, 8 November 2008
This is a module used by the guard-based auditing proposal, though it can stand alone.
CoercedSlots implement the Slot protocol.
Contents |
Maker
run/1
run(guard, specimen, ejector) :CoercedSlot
Makes a CoercedSlot holding the result of guard.coerce(specimen, ejector).
attempt/1
attempt(guard, value) :any[CoercedSlot
As run/1 unless the guard ejects, in which case the resulting slot's guard will be LostApproval[guard].
Protocol
getGuard/0
- Signature: getGuard() :Guard
Returns the guard that this slot's value was coerced, or otherwise approved, by.