Liking cljdoc? Tell your friends :D

hive-gimp.command

PROMOTE. Descriptor plus arguments to a GimpCommand, pure.

Everything here takes a VALUE and returns a VALUE. That is not tidiness: deftrifecta-from-schema synthesizes coverage from an :in schema, and a function whose first argument is a Descriptor has one while a function whose first argument is a command NAME does not. Writing this layer over the descriptor is what buys the suite.

This is also the ONLY namespace allowed to touch both vocabularies. Above it, arguments are kebab-case keywords; below it, JSON object keys are snake_case strings. A leak in either direction shows up here or nowhere.

PROMOTE. Descriptor plus arguments to a `GimpCommand`, pure.

Everything here takes a VALUE and returns a VALUE. That is not tidiness:
`deftrifecta-from-schema` synthesizes coverage from an `:in` schema, and a
function whose first argument is a `Descriptor` has one while a function
whose first argument is a command NAME does not. Writing this layer over
the descriptor is what buys the suite.

This is also the ONLY namespace allowed to touch both vocabularies. Above
it, arguments are kebab-case keywords; below it, JSON object keys are
snake_case strings. A leak in either direction shows up here or nowhere.
raw docstring

->commandclj

(->command descriptor args)

Descriptor plus kebab-case arguments to a GimpCommand.

Fails, rather than guessing, on: an unknown parameter, a missing required parameter, or a value that cannot be read as its declared type. Each failure names the parameter, because the alternative is a Python traceback from inside GIMP that names a line number in someone else's file.

`Descriptor` plus kebab-case arguments to a `GimpCommand`.

Fails, rather than guessing, on: an unknown parameter, a missing required
parameter, or a value that cannot be read as its declared type. Each failure
names the parameter, because the alternative is a Python traceback from
inside GIMP that names a line number in someone else's file.
sourceraw docstring

coerceclj

(coerce param value)

One argument coerced to what its ParamSpec declares.

Returns a Result so the failure carries the parameter name. A bare nil or a thrown exception here would reach the caller as GIMP rejected your call, which is true and useless.

One argument coerced to what its `ParamSpec` declares.

Returns a Result so the failure carries the parameter name. A bare nil or a
thrown exception here would reach the caller as `GIMP rejected your call`,
which is true and useless.
sourceraw docstring

defaulted-paramsclj

(defaulted-params descriptor)

Parameters carrying a default, as name to default value.

contains? rather than a truthy check, because nil and false are both legitimate defaults in this contract and both are falsey.

Parameters carrying a default, as name to default value.

`contains?` rather than a truthy check, because `nil` and `false` are both
legitimate defaults in this contract and both are falsey.
sourceraw docstring

nil-allowed?clj

(nil-allowed? param)

True when the plugin accepts an explicit null for this parameter.

Distinct from not required?: a parameter can be optional (it has a default) and still reject null once that default is applied.

True when the plugin accepts an explicit null for this parameter.

Distinct from `not required?`: a parameter can be optional (it has a
default) and still reject null once that default is applied.
sourceraw docstring

param-indexclj

(param-index descriptor)

Parameter name (keyword) to ParamSpec.

Parameter name (keyword) to `ParamSpec`.
sourceraw docstring

required-paramsclj

(required-params descriptor)

Parameters a caller must supply.

Parameters a caller must supply.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close