Malli schema implementation for amalloy.ring-buffer
Malli schema implementation for amalloy.ring-buffer
(-assert-capacity-properties {:keys [capacity max-capacity min-capacity]
:as properties})Throw an exception if :amalloy/ring-buffer schema properties
include both exact and range capacity contraints.
Throw an exception if `:amalloy/ring-buffer` schema properties include both exact and range capacity contraints.
(-capacity rb)Capacity of rb, a ring buffer.
Capacity of `rb`, a ring buffer.
(-sequential->ring-buffer-fn properties {:keys [overflow]})Construct a function that decodes sequentials to ring buffers.
Options:
:overflow - decode sequences larger than capacity instead of passing throughConstruct a function that decodes sequentials to ring buffers. Options: - `:overflow` - decode sequences larger than capacity instead of passing through
(-validate-capacity rb
{:keys [capacity min-capacity max-capacity]
:as _properties})Validate rb's capacity against :amalloy/ring-buffer schema properties
Validate `rb`'s capacity against `:amalloy/ring-buffer` schema properties
(-validator properties)Construct a validation predicate for a :amalloy/ring-buffer
schema properties map.
Construct a validation predicate for a `:amalloy/ring-buffer` schema properties map.
(ring-buffer-transformer)(ring-buffer-transformer opts)Transforms between ring buffers and sequentials.
Optionally accepts opts:
:overflow - decode sequences larger than capacity instead of passing throughTransforms between ring buffers and sequentials. Optionally accepts `opts`: - `:overflow` - decode sequences larger than capacity instead of passing through
(ring-buffer? x)Check if x is a ring buffer.
Check if `x` is a ring buffer.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |