CoercedSlot
From Erights
(Difference between revisions)
Kevin Reid (Talk | contribs) (correct attempt/1 doc to what should be, not what is implemented) |
Kevin Reid (Talk | contribs) (fix markup and content of result guard) |
||
Line 9: | Line 9: | ||
Makes a CoercedSlot holding the result of <var>guard</var>.coerce(<var>specimen</var>, <var>ejector</var>). | Makes a CoercedSlot holding the result of <var>guard</var>.coerce(<var>specimen</var>, <var>ejector</var>). | ||
- | {{maker msgdoc|attempt|1|<var>guard</var>, <var>value</var>| | + | {{maker msgdoc|attempt|1|<var>guard</var>, <var>value</var>|[[CoercedSlot]]}} |
As run/1 unless the guard ejects, in which case the resulting slot's guard will be [[Guard-based auditing|LostApproval]][<var>guard</var>]. | As run/1 unless the guard ejects, in which case the resulting slot's guard will be [[Guard-based auditing|LostApproval]][<var>guard</var>]. |
Revision as of 04:14, 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) :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.