aboutsummaryrefslogblamecommitdiffstats
path: root/lib/protocols/Handle.mli
blob: f63bbea7d9abac2b653cb5834605bf8f86e9f97a (plain) (tree)
1
2
3
4
5
6
7
8
9








                         
                                  


                                  
                    





                                                              
                          
                       

                                  

                                                                                                    
type t

type 'a interface

type protocol = ..

class type obj = object
  method reference : bool
  method release : unit
  method hash : Concepts.Hash.hash
  method protocols : protocol list
end

val make : #obj -> t

val into : t -> (protocol -> 'a option) -> 'a interface option

val invoke : 'a interface -> ('a -> 'b) -> 'b

val copy : t -> t option
val equal : t -> t -> bool
val release : t -> unit

val hash : t -> Concepts.Hash.hash

val require : (t -> 'a interface option) -> t -> ('a interface, Concepts.Condition.condition) result