CoercedSlot
From Erights
(Difference between revisions)
(wrong name for ExitFunction) |
Kevin Reid (Talk | contribs) |
||
Line 1: | Line 1: | ||
This is a module used by the [[guard-based auditing]] proposal, though it can stand alone. | This is a module used by the [[guard-based auditing]] proposal, though it can stand alone. | ||
- | [[CoercedSlot]]s implement the [[Slot]] protocol | + | [[CoercedSlot]]s implement the [[Slot]] protocol. |
==Maker== | ==Maker== | ||
- | {{maker msgdoc|run| | + | {{maker msgdoc|run|1|<var>guard</var>, <var>specimen</var>, <var>ejector</var>|[[CoercedSlot]]}} |
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| | + | {{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 a FinalSlot with <var>value</var> is returned. |
==Protocol== | ==Protocol== | ||
Line 18: | Line 18: | ||
Returns the guard that this slot's value was coerced, or otherwise approved, by. | Returns the guard that this slot's value was coerced, or otherwise approved, by. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
[[Category:ELib specification]] | [[Category:ELib specification]] |
Revision as of 04:11, 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 a FinalSlot with value is returned.
Protocol
getGuard/0
- Signature: getGuard() :Guard
Returns the guard that this slot's value was coerced, or otherwise approved, by.