Crate imageflow_types [] [src]

imageflow_types

Responsible for the schema of the JSON API, as well as for providing types used internally. (There is a lot of overlap, as there can be, in early versions).

snake_case vs camelCase

We don't currently do any style transformations, but we have tests to try to ensure they're always possible. Here are the transformation rules we use to verify all key names we select can be round-tripped between styles:

camelCase to snake_case

  1. Add a leading underscore to every group of numbers unless preceded by a lowercase x or y. /([^xy])([0-9]+)/ with "$1_$2"/
  2. Add a leading underscore before every uppercase letter: /[A-Z]/ with "_$0"
  3. Strip leading underscores from string /(\A|\s+)_+/ with "$1"
  4. Collapse all duplicate underscores replace("__", "_")
  5. Lowercase the resulting string

snake_case to camelCase

  1. Uppercase every letter following an underscore or word boundary. Regex::new(r"(_|\b)([a-z])").unwrap().replace_all(&s, |c: &Captures| c[0].to_uppercase())
  2. Lowercase first character of string
  3. Delete all underscores from string

Modules

build_env_info
collections
version

Structs

Build001
Build001Config
Build001GraphRecording
BuildResult
ConstraintResamplingHints
Edge
EncodeResult
Execute001
GetImageInfo001
Graph
ImageInfo
IoObject
JobResult
JpegIDCTDownscaleHints
ResampleHints
Response001
TellDecoder001

Enums

Color
ColorSrgb
CommandStringKind
Constraint
DecoderCommand
EdgeKind
EncoderPreset
Filter
Framewise
IoDirection
IoEnum
Node
PixelFormat
PngBitDepth
ResampleWhen
ResponsePayload
ResultBytes
TestEnum

Functions

rtf