jon.recoil.org

Module Capsule_expert.AccessSource

An Access.t allows wrapping and unwrapping Data.t values from the current capsule.

Sourcetype 'k t

'k t represents access to the current capsule, allowing wrapping and unwrapping Data.t values. An uncontended 'k t indicates that 'k is the current capsule. A shared 'k t indicates that 'k is the current capsule but that it may be shared with other threads.

'k ts captured in a portable closure become contended, which prevents sharing them with other threads.

packed is the type of access to some unknown capsule. Unpacking one provides a 'k t together with a fresh existential type brand for 'k.

Sourcetype 'k boxed

A boxed version of Access.t for places where you need a type with layout value.

Sourceval equality_witness : 'k Capsule_expert.Access.t -> 'j Capsule_expert.Access.t -> ('k, 'j) Stdlib.Type.eq @@ portable

equality_witness a b returns a witness that the brands of a and b are equal. This must be true since they are both present uncontended within the same capsule.