Liking cljdoc? Tell your friends :D

hive-gimp.response

PROMOTE. A raw plugin answer to an Outcome, pure.

The plugin answers with {"status": "success", "results": ...} or {"status": "error", "error": ..., "traceback": ...}. Both reference clients read result["status"] inline at every call site, which is why the same three-line unwrap appears eighty times in their server and why a command that forgets it silently returns the envelope instead of the value.

Interpreting once, here, over a VALUE, is the whole difference.

PROMOTE. A raw plugin answer to an `Outcome`, pure.

The plugin answers with `{"status": "success", "results": ...}` or
`{"status": "error", "error": ..., "traceback": ...}`. Both reference
clients read `result["status"]` inline at every call site, which is why the
same three-line unwrap appears eighty times in their server and why a
command that forgets it silently returns the envelope instead of the value.

Interpreting once, here, over a VALUE, is the whole difference.
raw docstring

->resultclj

(->result outcome)

Outcome as a hive-dsl Result, for callers composing with let-ok.

`Outcome` as a hive-dsl Result, for callers composing with `let-ok`.
sourceraw docstring

from-errorclj

(from-error command result)

A transport or promote failure rendered as an Outcome.

Everything a caller sees is an Outcome, whether it failed inside GIMP, on the socket, or before a byte was sent. One shape for all three is what lets the tool layer have a single error path instead of three.

A transport or promote failure rendered as an `Outcome`.

Everything a caller sees is an `Outcome`, whether it failed inside GIMP,
on the socket, or before a byte was sent. One shape for all three is what
lets the tool layer have a single error path instead of three.
sourceraw docstring

interpretclj

(interpret command raw)

RawResponse to Outcome.

command is carried through so a caller holding several outcomes can tell which one failed without correlating by position.

`RawResponse` to `Outcome`.

`command` is carried through so a caller holding several outcomes can tell
which one failed without correlating by position.
sourceraw docstring

ok?clj

(ok? outcome)
source

valueclj

(value outcome)

The result of a successful outcome, or nil.

Returns nil for an error ON PURPOSE and is therefore only safe after ok?. Callers that cannot branch should use ->result instead, which makes the failure impossible to ignore.

The result of a successful outcome, or nil.

Returns nil for an error ON PURPOSE and is therefore only safe after `ok?`.
Callers that cannot branch should use `->result` instead, which makes the
failure impossible to ignore.
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