ETagList

is the field value of an If-Match or If-None-Match header (RFC 9110 §13.1.1, §13.1.2): Any for the * that names whatever representation the resource currently has, and Tags for a list of entity-tags.

Any

instantiate

(Fn [] ETagList)

creates a Any.

Tags

instantiate

(Fn [(Array ETag)] ETagList)

creates a Tags.

copy

instantiate

(Fn [(Ref ETagList a)] ETagList)

copies a ETagList.

delete

instantiate

(Fn [ETagList] ())

deletes a ETagList. This should usually not be called manually.

get-tag

instantiate

(Fn [(Ref ETagList a)] Int)

Gets the tag from a ETagList.

parse

defn

(Fn [(Ref String a)] (Result ETagList String))

                        (parse s)
                    

parses an If-Match or If-None-Match field value as (Result ETagList String).

A field value of * yields Any; any other is read as a list of entity-tags, in header order. Whitespace around the commas is ignored, as are empty list elements (RFC 9110 §5.6.1.2); a comma inside an opaque-tag is not a delimiter. A member that is not a well-formed entity-tag fails, and so does an empty list, which neither header's grammar has room for.

prn

instantiate

(Fn [(Ref ETagList a)] String)

converts a ETagList to a string.

str

instantiate

(Fn [(Ref ETagList a)] String)

converts a ETagList to a string.

strong-match?

defn

(Fn [(Ref ETagList a), (Ref (Maybe ETag) a)] Bool)

                        (strong-match? l etag)
                    

whether l matches etag, the entity-tag of the representation the server selected — Nothing when it has none — under the strong comparison function If-Match calls for (RFC 9110 §13.1.1).

Any matches whenever the resource has a current representation, which Precondition.evaluate takes to be so whenever it is called.

weak-match?

defn

(Fn [(Ref ETagList a), (Ref (Maybe ETag) a)] Bool)

                        (weak-match? l etag)
                    

whether l matches etag under the weak comparison function If-None-Match calls for (RFC 9110 §13.1.2). See strong-match? for how Any is read.