File

teal-src/util/serialization.d.tl @ 12817:176fd3ea505c

util.openmetrics: Update tools.ietf.org URL to datatracker See bd9e006a7a74 for more context
author Kim Alvefur <zash@zash.se>
date Mon, 19 Dec 2022 23:11:42 +0100
parent 12616:6b70d1af1fe3
line wrap: on
line source

local record _M
	enum preset
		"debug"
		"oneline"
		"compact"
	end
	type fallback = function (any, string) : string
	record config
		preset : preset
		fallback :  fallback
		fatal : boolean
		keywords : { string : boolean }
		indentwith : string
		itemstart : string
		itemsep : string
		itemlast : string
		tstart : string
		tend : string
		kstart : string
		kend : string
		equals : string
		unquoted : boolean | string
		hex : string
		freeze : boolean
		maxdepth : integer
		multirefs : boolean
		table_pairs : function
	end
	type serializer = function (any) : string
	new : function (config|preset) : serializer
	serialize : function (any, config|preset) : string
end
return _M