CoercedSlot
From Erights
(Difference between revisions)
Kevin Reid (Talk | contribs) (→Maker: consistent var name) |
Kevin Reid (Talk | contribs) (better optUncall markup, restore lost getguard doc) |
||
Line 17: | Line 17: | ||
{{instance msgdoc|getGuard|0||[[Guard]]}} | {{instance msgdoc|getGuard|0||[[Guard]]}} | ||
- | + | Returns the guard that this slot's value was coerced, or otherwise approved, by. | |
+ | |||
+ | === __optUncall/0 === | ||
+ | [[Miranda __optUncall|__optUncall]]() :[[Portrayal]] | ||
Returns a portrayal in terms of [[#attempt/1]]. | Returns a portrayal in terms of [[#attempt/1]]. | ||
[[Category:ELib specification]] | [[Category:ELib specification]] |
Revision as of 04:40, 8 November 2008
This is a module used by the guard-based auditing proposal, though it can stand alone.
CoercedSlots implement the Slot protocol. They hold a single value, and the guard it was coerced by; they are immutable.
Contents |
Maker
run/3
run(guard :Guard, specimen, ejector :ExitFunc) :CoercedSlot
Makes a CoercedSlot holding the result of guard.coerce(specimen, ejector).
attempt/2
attempt(guard :Guard, specimen) :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.
__optUncall/0
Returns a portrayal in terms of #attempt/1.