Mercurial > prosody-hg
comparison teal-src/prosody/util/queue.d.tl @ 12979:fbbf4f0db8f0
teal: Move into prosody namespace
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 23 Mar 2023 13:36:52 +0100 |
| parents | teal-src/util/queue.d.tl@ef59fb975d3e |
| children | 9ec961173b1c |
comparison
equal
deleted
inserted
replaced
| 12978:088d278c75b5 | 12979:fbbf4f0db8f0 |
|---|---|
| 1 local record lib | |
| 2 record queue<T> | |
| 3 size : integer | |
| 4 count : function (queue<T>) : integer | |
| 5 enum push_errors | |
| 6 "queue full" | |
| 7 end | |
| 8 | |
| 9 push : function (queue<T>, T) : boolean, push_errors | |
| 10 pop : function (queue<T>) : T | |
| 11 peek : function (queue<T>) : T | |
| 12 replace : function (queue<T>, T) : boolean, push_errors | |
| 13 type iterator = function (T, integer) : integer, T | |
| 14 items : function (queue<T>) : iterator, T, integer | |
| 15 type consume_iter = function (queue<T>) : T | |
| 16 consume : function (queue<T>) : consume_iter | |
| 17 end | |
| 18 | |
| 19 new : function<T> (size:integer, allow_wrapping:boolean) : queue<T> | |
| 20 end | |
| 21 return lib; |
