isobmff.dhover×2014all
#!/usr/bin/env dub
/+ dub.sdl:
    name "images_wired_isobmff"
    dependency "sparkles:wired" path="../../../../.."
    dflags "-preview=in" "-preview=dip1000"
    buildType "checked" {
        buildOptions "optimize" "inline" "debugInfo"
    }
+/
/**
 * The ISOBMFF box structure that AVIF and HEIF use, on the
 * `sparkles:wired` that ships today.
 *
 * The fixed parts (the 8-byte box header, the FullBox version and flags,
 * `ftyp`, `hdlr`, `infe` version 2, `ispe`) are plain D structs read and
 * written by the schema walk of `png-chunks.d`. Everything else is
 * hand-written D, marked `GAP`: the 64-bit `largesize` when `size` is 1,
 * `size` 0 meaning "to the end of the file", the `uuid` extended type,
 * nesting inside a parent's declared size, version-dependent field widths
 * (`pitm`, `iinf`, `iloc`, `ipma`), `iloc`'s 4-bit size fields that set the
 * width of later fields, `ipma`'s 7- or 15-bit property indices with an
 * essential bit, and the references by item ID and by property index that
 * tie `pitm`, `iinf`, `iloc`, `ipco` and `ipma` together. On encode, every
 * box size and every `iloc` offset is back-patched by hand.
 *
 * Backs ../index.md (section "ISOBMFF"). Run with:
 * `dub run --single isobmff.d`
 */
module 
(module) images_wired_isobmff

The ISOBMFF box structure that AVIF and HEIF use, on the sparkles:wired that ships today.

The fixed parts (the 8-byte box header, the FullBox version and flags, ftyp, hdlr, infe version 2, ispe) are plain D structs read and written by the schema walk of png-chunks.d. Everything else is hand-written D, marked GAP: the 64-bit largesize when size is 1, size 0 meaning "to the end of the file", the uuid extended type, nesting inside a parent's declared size, version-dependent field widths (pitm, iinf, iloc, ipma), iloc's 4-bit size fields that set the width of later fields, ipma's 7- or 15-bit property indices with an essential bit, and the references by item ID and by property index that tie pitm, iinf, iloc, ipco and ipma together. On encode, every box size and every iloc offset is back-patched by hand.

Backs ../index.md (section "ISOBMFF"). Run with: dub run --single isobmff.d

images_wired_isobmff
;
import
(package) std
std
.
(module) std.format

This package provides string formatting functionality using printf style format strings.

Submodule Function Name Description
package
format
Converts its arguments according to a format string into a string.

| package | sformat | Converts its arguments according to a format string into a buffer. |

| package | FormatException | Signals a problem while formatting. |

| write | formattedWrite | Converts its arguments according to a format string and writes the result to an output range. |

| write | formatValue | Formats a value of any type according to a format specifier and writes the result to an output range. |

| read | formattedRead | Reads an input range according to a format string and stores the read values into its arguments. |

| read | unformatValue | Reads a value from the given input range and converts it according to a format specifier. |

| spec | FormatSpec | A general handler for format strings. |

| spec | singleSpec | Helper function that returns a FormatSpec for a single format specifier. |

Limitation

This package does not support localization, but adheres to the rounding mode of the floating point unit, if available.

Format Strings

The functions contained in this package use format strings. A format string describes the layout of another string for reading or writing purposes. A format string is composed of normal text interspersed with format specifiers. A format specifier starts with a percentage sign '%', optionally followed by one or more parameters and ends with a format indicator. A format indicator may be a simple format character or a compound indicator.

Format strings are composed according to the following grammar:

FormatString: FormatStringItem FormatString FormatStringItem: Character FormatSpecifier FormatSpecifier: '%' Parameters FormatIndicator

FormatIndicator: FormatCharacter CompoundIndicator FormatCharacter: see remark below CompoundIndicator: '(' FormatString '%)' '(' FormatString '%|' Delimiter '%)' Delimiter empty Character Delimiter

Parameters: Position Flags Width Precision Separator Position: empty Integer '$'** *Integer* **':'** *Integer* **'$' Integer ':' '$'** *Flags*: *empty* *Flag* *Flags* *Flag*: **'-'**|**'+'**|**' '**|**'0'**|**'#'**|**'='** *Width*: *OptionalPositionalInteger* *Precision*: *empty* **'.'** *OptionalPositionalInteger* *Separator*: *empty* **','** *OptionalInteger* **','** *OptionalInteger* **'?'** *OptionalInteger*: *empty* *Integer* **'*'** *OptionalPositionalInteger*: *OptionalInteger* **'*'** *Integer* **'$'

Character '%%' AnyCharacterExceptPercent Integer: NonZeroDigit Digits Digits: empty Digit Digits NonZeroDigit: '1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9' Digit: '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'

Note

FormatCharacter is unspecified. It can be any character that has no other purpose in this grammar, but it is recommended to assign (lower- and uppercase) letters.

Note

The Parameters of a CompoundIndicator are currently limited to a '-' flag.

Format Indicator

The format indicator can either be a single character or an expression surrounded by '%(' and '%)'. It specifies the basic manner in which a value will be formatted and is the minimum requirement to format a value.

The following characters can be used as format characters:

FormatCharacter Semantics
's'
To be formatted in a human readable format.
Can be used with all types.
'c'
To be formatted as a character.
'd'
To be formatted as a signed decimal integer.
'u'
To be formatted as a decimal image of the underlying bit representation.
'b'
To be formatted as a binary image of the underlying bit representation.
'o'
To be formatted as an octal image of the underlying bit representation.
'x' / 'X'
To be formatted as a hexadecimal image of the underlying bit representation.
'e' / 'E'
To be formatted as a real number in decimal scientific notation.
'f' / 'F'
To be formatted as a real number in decimal natural notation.
'g' / 'G'
To be formatted as a real number in decimal short notation.
Depending on the number, a scientific notation or
a natural notation is used.
'a' / 'A'
To be formatted as a real number in hexadecimal scientific notation.
'r'
To be formatted as raw bytes.
The output may not be printable and depends on endianness.

The compound indicator can be used to describe compound types like arrays or structs in more detail. A compound type is enclosed within '%(' and '%)'. The enclosed sub-format string is applied to individual elements. The trailing portion of the sub-format string following the specifier for the element is interpreted as the delimiter, and is therefore omitted following the last element. The '%|' specifier may be used to explicitly indicate the start of the delimiter, so that the preceding portion of the string will be included following the last element.

The format string inside of the compound indicator should contain exactly one format specifier (two in case of associative arrays), which specifies the formatting mode of the elements of the compound type. This format specifier can be a compound indicator itself.

Note

Inside a compound indicator, strings and characters are escaped automatically. To avoid this behavior, use "%-(" instead of "%(".

Flags

There are several flags that affect the outcome of the formatting.

Flag Semantics
'-'
When the formatted result is shorter than the value
given by the width parameter, the output is left
justified. Without the '-' flag, the output remains
right justified.

There are two exceptions where the '-' flag has a different meaning: (1) with 'r' it denotes to use little endian and (2) in case of a compound indicator it means that no special handling of the members is applied. | | '=' | When the formatted result is shorter than the value given by the width parameter, the output is centered. If the central position is not possible it is moved slightly to the right. In this case, if '-' flag is present in addition to the '=' flag, it is moved slightly to the left. | | '+' / *' '* | Applies to numerical values. By default, positive numbers are not formatted to include the + sign. With one of these two flags present, positive numbers are preceded by a plus sign or a space. When both flags are present, a plus sign is used.

In case of 'r', a big endian format is used. | | '0' | Is applied to numerical values that are printed right justified. If the zero flag is present, the space left to the number is filled with zeros instead of spaces. | | '#' | Denotes that an alternative output must be used. This depends on the type to be formatted and the format character used. See the sections below for more information. |

Width, Precision and Separator

The width parameter specifies the minimum width of the result.

The meaning of precision depends on the format indicator. For integers it denotes the minimum number of digits printed, for real numbers it denotes the number of fractional digits and for strings and compound types it denotes the maximum number of elements that are included in the output.

A separator is used for formatting numbers. If it is specified, the output is divided into chunks of three digits, separated by a ','. The number of digits in a chunk can be given explicitly by providing a number or a ''* after the ','.

In all three cases the number of digits can be replaced by a ''*. In this scenario, the next argument is used as the number of digits. If the argument is a negative number, the precision and separator parameters are considered unspecified. For width, the absolute value is used and the '-' flag is set.

The separator can also be followed by a '?'. In that case, an additional argument is used to specify the symbol that should be used to separate the chunks.

Position

By default, the arguments are processed in the provided order. With the position parameter it is possible to address arguments directly. It is also possible to denote a series of arguments with two numbers separated by ':', that are all processed in the same way. The second number can be omitted. In that case the series ends with the last argument.

It's also possible to use positional arguments for width, precision and separator by adding a number and a '$' after the ''*.

Types

This section describes the result of combining types with format characters. It is organized in 2 subsections: a list of general information regarding the formatting of types in the presence of format characters and a table that contains details for every available combination of type and format character.

When formatting types, the following rules apply:

  • If the format character is upper case, the resulting string will be formatted using upper case letters.

  • The default precision for floating point numbers is 6 digits.

  • Rounding of floating point numbers adheres to the rounding mode of the floating point unit, if available.

  • The floating point values NaN and Infinity are formatted as nan and inf, possibly preceded by '+' or '-' sign.

  • Formatting reals is only supported for 64 bit reals and 80 bit reals. All other reals are cast to double before they are formatted. This will cause the result to be inf for very large numbers.

  • Characters and strings formatted with the 's' format character inside of compound types are surrounded by single and double quotes and unprintable characters are escaped. To avoid this, a '-' flag can be specified for the compound specifier (e.g. "%-(%s%)" instead of "%(%s%)" ).

  • Structs, unions, classes and interfaces are formatted by calling a toString method if available. See module std.format.write for more details.

  • Only part of these combinations can be used for reading. See module std.format.read for more detailed information.

This table contains descriptions for every possible combination of type and format character:

<th scope="col" width="20%">Type</th> <th scope="col" width="20%">Format Character</th> Formatted as...
<td rowspan="1">null</td> 's'
null

|<td rowspan="3">bool</td> 's' | false or true |

| 'b', 'd', 'o', 'u', 'x', 'X' | As the integrals 0 or 1 with the same format character.

Please note, that 'o' and 'x' with '#' flag might produce unexpected results due to special handling of the value 0. |

| 'r' | \0 or \1 |

|<td rowspan="4">Integral</td> 's', 'd' | A signed decimal number. The '#' flag is ignored. |

| 'b', 'o', 'u', 'x', 'X' | An unsigned binary, decimal, octal or hexadecimal number.

In case of 'o' and 'x', the '#' flag denotes that the number must be preceded by 0 and 0x, with the exception of the value 0, where this does not apply. For 'b' and 'u' the '#' flag has no effect. |

| 'e', 'E', 'f', 'F', 'g', 'G', 'a', 'A' | As a floating point value with the same specifier.

Default precision is large enough to add all digits of the integral value.

In case of 'a' and 'A', the integral digit can be any hexadecimal digit. |

| 'r' | Characters taken directly from the binary representation. |

|<td rowspan="5">Floating Point</td> 'e', 'E' | Scientific notation: Exactly one integral digit followed by a dot and fractional digits, followed by the exponent. The exponent is formatted as 'e' followed by a '+' or '-' sign, followed by at least two digits.

When there are no fractional digits and the '#' flag is not present, the dot is omitted. |

| 'f', 'F' | Natural notation: Integral digits followed by a dot and fractional digits.

When there are no fractional digits and the '#' flag is not present, the dot is omitted.

Please note: the difference between 'f' and 'F' is only visible for NaN and Infinity. |

| 's', 'g', 'G' | Short notation: If the absolute value is larger than 10 ^^ precision or smaller than 0.0001, the scientific notation is used. If not, the natural notation is applied.

In both cases precision denotes the count of all digits, including the integral digits. Trailing zeros (including a trailing dot) are removed.

If '#' flag is present, trailing zeros are not removed. |

| 'a', 'A' | Hexadecimal scientific notation: 0x followed by 1 (or 0 in case of value zero or denormalized number) followed by a dot, fractional digits in hexadecimal notation and an exponent. The exponent is build by p, followed by a sign and the exponent in decimal notation.

When there are no fractional digits and the '#' flag is not present, the dot is omitted. |

| 'r' | Characters taken directly from the binary representation. |

|<td rowspan="3">Character</td> 's', 'c' | As the character.

Inside of a compound indicator 's' is treated differently: The character is surrounded by single quotes and non printable characters are escaped. This can be avoided by preceding the compound indicator with a '-' flag (e.g. "%-(%s%)"). |

| 'b', 'd', 'o', 'u', 'x', 'X' | As the integral that represents the character. |

| 'r' | Characters taken directly from the binary representation. |

|<td rowspan="3">String</td> 's' | The sequence of characters that form the string.

Inside of a compound indicator the string is surrounded by double quotes and non printable characters are escaped. This can be avoided by preceding the compound indicator with a '-' flag (e.g. "%-(%s%)"). |

| 'r' | The sequence of characters, each formatted with 'r'. |

| compound | As an array of characters. |

|<td rowspan="3">Array</td> 's' | When the elements are characters, the array is formatted as a string. In all other cases the array is surrounded by square brackets and the elements are separated by a comma and a space. If the elements are strings, they are surrounded by double quotes and non printable characters are escaped. |

| 'r' | The sequence of the elements, each formatted with 'r'. |

| compound | The sequence of the elements, each formatted according to the specifications given inside of the compound specifier. |

|<td rowspan="2">Associative Array</td> 's' | As a sequence of the elements in unpredictable order. The output is surrounded by square brackets. The elements are separated by a comma and a space. The elements are formatted as key:value. |

| compound | As a sequence of the elements in unpredictable order. Each element is formatted according to the specifications given inside of the compound specifier. The first specifier is used for formatting the key and the second specifier is used for formatting the value. The order can be changed with positional arguments. For example "%(%2$s (%1$s), %)" will write the value, followed by the key in parenthesis. |

|<td rowspan="2">Enum</td> 's' | The name of the value. If the name is not available, the base value is used, preceeded by a cast. |

| All, but 's' | Enums can be formatted with all format characters that can be used with the base value. In that case they are formatted like the base value. |

|<td rowspan="3">Input Range</td> 's' | When the elements of the range are characters, they are written like a string. In all other cases, the elements are enclosed by square brackets and separated by a comma and a space. |

| 'r' | The sequence of the elements, each formatted with 'r'. |

| compound | The sequence of the elements, each formatted according to the specifications given inside of the compound specifier. |

|<td rowspan="1">Struct</td> 's' | When the struct has neither an applicable toString nor is an input range, it is formatted as follows: StructType(field1, field2, ...). |

|<td rowspan="1">Class</td> 's' | When the class has neither an applicable toString nor is an input range, it is formatted as the fully qualified name of the class. |

|<td rowspan="1">Union</td> 's' | When the union has neither an applicable toString nor is an input range, it is formatted as its base name. |

|<td rowspan="2">Pointer</td> 's' | A null pointer is formatted as 'null'. All other pointers are formatted as hexadecimal numbers with the format character 'X'. |

| 'x', 'X' | Formatted as a hexadecimal number. |

|<td rowspan="3">SIMD vector</td> 's' | The array is surrounded by square brackets and the elements are separated by a comma and a space. |

| 'r' | The sequence of the elements, each formatted with 'r'. |

| compound | The sequence of the elements, each formatted according to the specifications given inside of the compound specifier. |

|<td rowspan="1">Delegate</td> 's', 'r', compound | As the .stringof of this delegate treated as a string.

Please note: The implementation is currently buggy and its use is discouraged. |

Source

std/format/package.d

Examples

Simple use:

// Easiest way is to use `%s` everywhere:
assert(format("I got %s %s for %s euros.", 30, "eggs", 5.27) == "I got 30 eggs for 5.27 euros.");

// Other format characters provide more control:
assert(format("I got %b %(%X%) for %f euros.", 30, "eggs", 5.27) == "I got 11110 65676773 for 5.270000 euros.");

Compound specifiers allow formatting arrays and other compound types:

/*
The trailing end of the sub-format string following the specifier for
each item is interpreted as the array delimiter, and is therefore
omitted following the last array item:
 */
    assert(format("My items are %(%s %).", [1,2,3]) == "My items are 1 2 3.");
    assert(format("My items are %(%s, %).", [1,2,3]) == "My items are 1, 2, 3.");

/*
The "%|" delimiter specifier may be used to indicate where the
delimiter begins, so that the portion of the format string prior to
it will be retained in the last array element:
 */
    assert(format("My items are %(-%s-%|, %).", [1,2,3]) == "My items are -1-, -2-, -3-.");

/*
These compound format specifiers may be nested in the case of a
nested array argument:
 */
    auto mat = [[1, 2, 3],
                [4, 5, 6],
                [7, 8, 9]];

    assert(format("%(%(%d %) - %)", mat), "1 2 3 - 4 5 6 - 7 8 9");
    assert(format("[%(%(%d %) - %)]", mat), "[1 2 3 - 4 5 6 - 7 8 9]");
    assert(format("[%([%(%d %)]%| - %)]", mat), "[1 2 3] - [4 5 6] - [7 8 9]");

/*
Strings and characters are escaped automatically inside compound
format specifiers. To avoid this behavior, use "%-(" instead of "%(":
 */
    assert(format("My friends are %s.", ["John", "Nancy"]) == `My friends are ["John", "Nancy"].`);
    assert(format("My friends are %(%s, %).", ["John", "Nancy"]) == `My friends are "John", "Nancy".`);
    assert(format("My friends are %-(%s, %).", ["John", "Nancy"]) == `My friends are John, Nancy.`);

Using parameters:

// Flags can be used to influence to outcome:
assert(format("%g != %+#g", 3.14, 3.14) == "3.14 != +3.14000");

// Width and precision help to arrange the formatted result:
assert(format(">%10.2f<", 1234.56789) == ">   1234.57<");

// Numbers can be grouped:
assert(format("%,4d", int.max) == "21,4748,3647");

// It's possible to specify the position of an argument:
assert(format("%3$s %1$s", 3, 17, 5) == "5 3");

Providing parameters as arguments:

// Width as argument
assert(format(">%*s<", 10, "abc") == ">       abc<");

// Precision as argument
assert(format(">%.*f<", 5, 123.2) == ">123.20000<");

// Grouping as argument
assert(format("%,*d", 1, int.max) == "2,1,4,7,4,8,3,6,4,7");

// Grouping separator as argument
assert(format("%,3?d", '_', int.max) == "2_147_483_647");

// All at once
assert(format("%*.*,*?d", 20, 15, 6, '/', int.max) == "   000/002147/483647");
@copyrightCopyright The D Language Foundation 2000-2021.@licenseBoost License 1.0.@authorsWalter Bright, Andrei Alexandrescu, and Kenji Hara
format
:
(alias template) images_wired_isobmff.format = std.format.format(Char, Args...)(in Char[] fmt, Args args) if (isSomeChar!Char)

Converts its arguments according to a format string into a string.

The second version of format takes the format string as template argument. In this case, it is checked for consistency at compile-time and produces slightly faster code, because the length of the output buffer can be estimated in advance.

@paramfmt a format string@paramargs a variadic list of arguments to be formatted@paramChar character type of fmt@paramArgs a variadic list of types of the arguments@returnsThe formatted string.@throwsA FormatException if formatting did not succeed.@seesformat for a variant, that tries to avoid garbage collection.
format
;
import
(package) std
std
.
(module) std.stdio
Category Symbols
File handles _popen File isFileHandle openNetwork stderr stdin stdout
Reading chunks lines readf readfln readln
Writing toFile write writef writefln writeln
Misc KeepTerminator LockType StdioException

Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio is publically imported when importing std.stdio.

There are three layers of I/O:

  1. The lowest layer is the operating system layer. The two main schemes are Windows and Posix.

  2. C's stdio.h which unifies the two operating system schemes.

  3. std.stdio, this module, unifies the various stdio.h implementations into a high level package for D programs.

Source

std/stdio.d

@copyrightCopyright The D Language Foundation 2007-.@licenseBoost License 1.0.@authorsWalter Bright, Andrei Alexandrescu, Alex Rønne Petersen
stdio
:
(alias template) images_wired_isobmff.writefln = std.stdio.writefln(alias fmt, A...)(A args) if (isSomeString!(typeof(fmt)))

Equivalent to writef(fmt, args, '\n').

writefln
;
import
(package) std
std
.
(module) std.traits

Templates which extract information about types and symbols at compile time.

Category Templates
Symbol Name traits fullyQualifiedName mangledName moduleName packageName
Function traits isFunction arity functionAttributes hasFunctionAttributes functionLinkage FunctionTypeOf isSafe isUnsafe isFinal ParameterDefaults ParameterIdentifierTuple ParameterStorageClassTuple Parameters ReturnType SetFunctionAttributes variadicFunctionStyle
Aggregate Type traits BaseClassesTuple BaseTypeTuple classInstanceAlignment EnumMembers FieldNameTuple Fields hasAliasing hasElaborateAssign hasElaborateCopyConstructor hasElaborateDestructor hasElaborateMove hasIndirections hasMember hasStaticMember hasNested hasUnsharedAliasing InterfacesTuple isInnerClass isNested MemberFunctionsTuple RepresentationTypeTuple TemplateArgsOf TemplateOf TransitiveBaseTypeTuple
Type Conversion CommonType AllImplicitConversionTargets ImplicitConversionTargets CopyTypeQualifiers CopyConstness isAssignable isCovariantWith isImplicitlyConvertible isQualifierConvertible
Type Constructors InoutOf ConstOf SharedOf SharedInoutOf SharedConstOf SharedConstInoutOf ImmutableOf QualifierOf
Categories of types allSameType ifTestable isType isAggregateType isArray isAssociativeArray isAutodecodableString isBasicType isBoolean isBuiltinType isCopyable isDynamicArray isEqualityComparable isFloatingPoint isIntegral isNarrowString isConvertibleToString isNumeric isOrderingComparable isPointer isScalarType isSigned isSIMDVector isSomeChar isSomeString isStaticArray isUnsigned
Type behaviours isAbstractClass isAbstractFunction isCallable isDelegate isExpressions isFinalClass isFinalFunction isFunctionPointer isInstanceOf isIterable isMutable isSomeFunction isTypeTuple
General Types ForeachType KeyType Largest mostNegative OriginalType PointerTarget Signed Unconst Unshared Unqual Unsigned ValueType Promoted
Misc lvalueOf rvalueOf Select select
User-Defined Attributes hasUDA getUDAs getSymbolsByUDA

Source

std/traits.d

@copyrightCopyright The D Language Foundation 2005 - 2009.@licenseBoost License 1.0.@authorsWalter Bright, Tomasz Stachowiak (isExpressions), Andrei Alexandrescu, Shin Fujishiro, Robert Clipsham, David Nadlinger, Kenji Hara, Shoichi Kato
traits
:
(alias template) images_wired_isobmff.EnumMembers = std.traits.EnumMembers(E) if (is(E == enum))

Retrieves the members of an enumerated type enum E.

Note

An enum can have multiple members which have the same value. If you want to use EnumMembers to e.g. generate switch cases at compile-time, you should use the NoDuplicates template to avoid generating duplicate switch cases.

Note

Returned values are strictly typed with E. Thus, the following code does not work without the explicit cast:

enum E : int { a, b, c }
int[] abc = cast(int[]) [ EnumMembers!E ];

Cast is not necessary if the type of the variable is inferred. See the example below.

@paramE An enumerated type. E may have duplicated values.@returnsStatic tuple composed of the members of the enumerated type E. The members are arranged in the same order as declared in E. The name of the enum can be found by querying the compiler for the name of the identifier, i.e. __traits(identifier, EnumMembers!MyEnum[i]). For enumerations with unique values, to can also be used.
EnumMembers
,
(alias template) images_wired_isobmff.OriginalType = std.traits.OriginalType(T)

Strips off all enums from type T.

OriginalType
;
import
(package) sparkles
sparkles
.
(package) sparkles.base
base
.
(module) sparkles.base.expected

This module is implementing the Expected idiom.

See the $(LINK2 http://channel9.msdn.com/Shows/Going+Deep/C-and-Beyond-2012-Andrei-Alexandrescu-Systematic-Error-Handling-in-C, Andrei Alexandrescu’s talk (Systematic Error Handling in C++) and its slides.

Or more recent "Expect the Expected" by Andrei Alexandrescu for further background.

It is also inspired by C++'s proposed std::expected and Rust's Result.

Similar work is expectations by Paul Backus.

Main features

  • lightweight, no other external dependencies

  • works with pure, @safe, @nogc, nothrow, and immutable

  • provides methods: ok, err, consume, expect, expectErr, andThen, orElse, map, mapError, mapOrElse

  • type inference for ease of use with ok and err

  • allows to use same types for T and E

  • allows to define Expected without value (void for T) - can be disabled with custom Hook

  • provides facility to change the Expected behavior by custom Hook implementation using the Design by introspection paradigm.

  • can enforce result check (with a cost)

  • can behave like a normal Exception handled code by changing the used Hook implementation

  • range interface

Description

Actual Expected type is defined as Expected!(T, E, Hook), where:

  • T defines type of the success value

  • E defines type of the error

  • Hook defines behavior of the Expected

Default type for error is string, i.e. Expected!int is the same as Expected!(int, string).

Abort is used as a default hook.

Hooks

Expected has customizable behavior with the help of a third type parameter, Hook. Depending on what methods Hook defines, core operations on the Expected may be verified or completely redefined. If Hook defines no method at all and carries no state, there is no change in default behavior.

This module provides a few predefined hooks (below) that add useful behavior to Expected:

| Abort | Fails every incorrect operation with a call to assert(0). It is the default third parameter, i.e. Expected!short is the same as Expected!(short, string, Abort). | | Throw | Fails every incorrect operation by throwing an exception. | | AsException | With this hook implementation Expected behaves just like regular Exception handled code.

That means when function returns expected value, it returns instance of Expected with a success value. But when it tries to return error, Exception is thrown right away, i.e. Expected fails in constructor. | | RCAbort | Similar to Abort hook but uses reference counted payload instead which enables checking if the caller properly checked result of the Expected. |

The hook's members are looked up statically in a Design by Introspection manner and are all optional. The table below illustrates the members that a hook type may define and their influence over the behavior of the Checked type using it. In the table, hook is an alias for Hook if the type Hook does not introduce any state, or an object of type Hook otherwise.

  • Hook member

Semantics in Expected!(T, E, Hook)

    -
    - `enableDefaultConstructor`
        - If defined, `Expected` would have enabled or disabled default constructor
            based on it's `bool` value. Default constructor is disabled by default.
            `opAssign` for value and error types is generated if default constructor is enabled.

            -
            - `enableCopyConstructor`
                - If defined, `Expected` would have enabled or disabled copy constructor based
                    on it's `bool` value. It is enabled by default. When disabled, it enables automatic
                    check if the result was checked either for value or error.
                    When not checked it calls `hook.onUnchecked` if provided.

                    WARNING: As currently it's not possible to change internal state of `const`
                    or `immutable` object, automatic checking would't work on these. Hopefully with
                    `__mutable` proposal..

                    -
                    - `enableRefCountedPayload`
                        - Set `Expected` instances to use reference counted payload storage. It's usefull
                            when combined with `onUnchecked` to forcibly check that the result was checked for value
                            or error.

                            -
                            - `enableVoidValue`
                                - Defines if `Expected` supports `void` values. It's enabled by default so this
                                    hook can be used to disable it.

                                    -
                                    - `onAccessEmptyValue`
                                        - If value is accessed on unitialized `Expected` or `Expected` with error
                                            value, `hook.onAccessEmptyValue!E(err)` is called. If hook doesn't implement the
                                            handler, `T.init` is returned.

                                            -
                                            - `onAccessEmptyError`
                                                - If error is accessed on unitialized `Expected` or `Expected` with value,
                                                    `hook.onAccessEmptyError()` is called. If hook doesn't implement the handler,
                                                    `E.init` is returned.

                                                    -
                                                    - `onUnchecked`
                                                        - If the result of `Expected` isn't checked, `hook.onUnchecked()` is called to
                                                            handle the error. If hook doesn't implement the handler, assert is thrown.
                                                            Note that `hook.enableCopyConstructor` must be `false` or `hook.enableRefCountedPayload`
                                                            must be `true` for checks to work.

                                                            -
                                                            - `onValueSet`
                                                                - `hook.onValueSet!T(val)` function is called when success value is being set to
                                                                    `Expected`. It can be used for loging purposes, etc.

                                                                    -
                                                                    - `onErrorSet`
                                                                        - `hook.onErrorSet!E(err)` function is called when error value is being set to
                                                                            `Expected`. This hook function is used by `AsException` hook implementation
                                                                            to change `Expected` idiom to normal `Exception` handling behavior.

Vendored from tchaloupka/expected by Tomáš Chaloupka, at commit 0793e8b7dc06dd05b3fa3103e5a99bf0bfd5f638: release 0.4.1 plus the five commits upstream made after it, which no release tags:

  • e35db58c5b454aceffcc2f90fb6aa2a9e4e2e132 makes the advanced usage example work outside the module;

  • 60afab8725bb4c48542884174bb67a68548fe0a0 keeps the source hook in map/mapError and lets map return void;

  • 5f1f2083381fdfcfa22428541be98694087fcd30 makes isVoidValueEnabled read the member it checks;

  • 5ee6c2a531b3d66964795274b1bcbdbd9cb7294f allocates the reference-counted payload of a void Expected;

  • 0793e8b7dc06dd05b3fa3103e5a99bf0bfd5f638 tests that map to void keeps the source hook.

It stops before 0.5.0, which marks Expected @mustuse by making it an explicit template around the struct: that breaks matching Expected!(T, E, H) in is expressions, which Sparkles relies on, and turns every discarded result into an error.

Changed from upstream only where Sparkles' build flags require it: the module name (and the advanced example's imports of it), the ``expected. prefix on its test names, const for in on the extern(C) GC declarations (-preview=in rejects in there), and the Throw hook throwing an error object read through an inout accessor unqualified (base disallows deprecations). No other changes.

Why vendored: it is one module of about 2000 lines under Sparkles' own licence (BSL-1.0). As a dub package it put expected and, through its unittest configuration, silly (which Sparkles does not use) into nearly every one of the repository's 88 dub.selections.json files and into the Nix dub locks. The fixes upstream made after 0.4.1 are untagged, so dub could not take them. Owning the copy keeps it building under Sparkles' flags and conventions.

Examples

Basic usage

auto foo(int i) {
    if (i == 0) return err!int("oops");
    return ok(42 / i);
}

version (D_Exceptions)
{
    auto bar(int i) {
        if (i == 0) throw new Exception("err");
        return i-1;
    }
}

// basic checks
assert(foo(2));
assert(foo(2).hasValue);
assert(!foo(2).hasError);
assert(foo(2).value == 21);

assert(!foo(0));
assert(!foo(0).hasValue);
assert(foo(0).hasError);
assert(foo(0).error == "oops");

// void result
assert(ok()); // no error -> success
assert(!ok().hasError);
// assert(err("foo").hasValue); // doesn't have hasValue and value properties

version (D_Exceptions)
{
    // expected from throwing function
    assert(consume!bar(1) == 0);
    assert(consume!bar(0).error.msg == "err");
}

// orElse
assert(foo(2).orElse!(() => 0) == 21);
assert(foo(0).orElse(100) == 100);

// andThen
assert(foo(2).andThen(foo(6)) == 7);
assert(foo(0).andThen(foo(6)).error == "oops");

// map
assert(foo(2).map!(a => a*2).map!(a => a - 2) == 40);
assert(foo(0).map!(a => a*2).map!(a => a - 2).error == "oops");

// mapError
assert(foo(0).mapError!(e => "OOPS").error == "OOPS");
assert(foo(2).mapError!(e => "OOPS") == 21);

// mapOrElse
assert(foo(2).mapOrElse!(v => v*2, e => 0) == 42);
assert(foo(0).mapOrElse!(v => v*2, e => 0) == 0);

Advanced usage - behavior modification

import exp = sparkles.base.expected;
import sparkles.base.expected : orElse; // UFCS doesn't work with renamed imports
import std.exception : assertThrown;

// define our Expected type using Exception as Error values
// and Throw hook, which throws when empty value or error is accessed
template Expected(T)
{
    alias Expected = exp.Expected!(T, Exception, exp.Throw);
}

// create wrappers for simplified usage of our Expected
auto ok(T)(T val) { return exp.ok!(Exception, exp.Throw)(val); }
auto err(T)(Exception err) { return exp.err!(T, exp.Throw)(err); }

// use it as normal
assert(ok(42) == 42);
assert(err!int(new Exception("foo")).orElse(0) == 0);
assertThrown(ok(42).error);
assertThrown(err!int(new Exception("bar")).value);
@copyrightCopyright © 2019, Tomáš Chaloupka@authorsTomáš Chaloupka, with contributions from Kostiantyn Tokar, Jan Jurzitza, Beyar and Petar Kirov (the upstream history to the vendored commit)@licenseBSL-1.0
expected
:
(alias struct) images_wired_isobmff.Expected = sparkles.base.expected.Expected(T, E = string, Hook = Abort) if (!is(E == void) && (isVoidValueEnabled!Hook || !is(T == void)))

``Expected!(T, E) is a type that represents either success or failure.

Type T is used for success value. If T is void, then Expected can only hold error value and is considered a success when there is no error value.

Type E is used for error value. The default type for the error value is string.

Default behavior of Expected can be modified by the Hook template parameter.

@paramT represents type of the expected value@paramE represents type of the error value.@paramHook defines the Expected type behavior
Expected
,
(alias template) images_wired_isobmff.err = sparkles.base.expected.err(T = void, Hook = Abort, E)(auto ref E err)

Creates an Expected object from an error value, with type inference.

err
,
(alias template) images_wired_isobmff.ok = sparkles.base.expected.ok(E = string, Hook = Abort, T)(auto ref T value)

Creates an Expected object from an expected value, with type inference.

ok
;
import
(package) sparkles
sparkles
.
(package) sparkles.wired
wired
.
(module) sparkles.wired.policy

Format-aware @Wire* policy attributes and their value vocabulary.

This module is the format-agnostic policy layer of sparkles:wired: it defines the marker sentinel AnyFormat, the policy enums (Repr, WireTarget, WireSkip, WireInvalid), and the @Wire* user-defined attributes a type author annotates enum members, fields, and types with. A concrete format backend (e.g. sparkles.wired.json) resolves these against its own format tag.

Each value-carrying attribute is a factory function (WireName, WireCase, WireRepr, WireOptional) returning a format-parameterized *Attr struct — so both @WireName("x") and @WireName!Json("x") work as ordinary compile-time calls. Resolvers detect and read the attributes through the *Attr structs.

See docs/specs/wired/SPEC.md §5 for the normative surface.

policy
:
(alias template) images_wired_isobmff.isBetween = sparkles.wired.policy.isBetween(alias lower, alias upper)

Declarative inclusive-bound check usable as a WireCheck predicate.

isBetween
,
(alias template) images_wired_isobmff.isOneOf = sparkles.wired.policy.isOneOf(values...)

Declarative membership check usable as a WireCheck predicate.

isOneOf
,
(alias struct) images_wired_isobmff.WireCheck = sparkles.wired.policy.WireCheck(alias predicate_, string message_ = "", Format_ = AnyFormat)

A field/type refinement, applied after decode conversion and before encode conversion.

WireCheck
,
(alias template) images_wired_isobmff.wireCheckFailures = sparkles.wired.policy.wireCheckFailures(F, alias symbol, T)(in T value)

Runs the shared four-protocol check vocabulary at a type or field site. static because symbol may alias a field: without it the instantiation would need an instance of the field's aggregate as its context.

wireCheckFailures
;
import
(package) sparkles
sparkles
.
(package) sparkles.wired
wired
.
(module) sparkles.wired.schema

Compile-time wire-schema reification.

wireSchemaOf!(F, T) lowers the currently supported wired type vocabulary to plain data. Nodes and child edges are flat arenas; recursive re-entry is an explicit NodeKind.reference node whose referenceIndex names an earlier node. Policy values are resolved through sparkles.wired.policy, once, while the arena is built.

fieldPolicies is a compatibility projection of aggregate child snapshots. The builder consumes the declaration-only policy seed, avoiding a policy/schema template cycle.

schema
:
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
,
(enum) sparkles.wired.schema.ScalarKind

Scalar distinctions which can affect a format's wire representation.

ScalarKind
,
(struct) sparkles.wired.schema.WireSchema

Flat compile-time schema arena. Node zero is always the root.

edges[node.firstEdge .. node.firstEdge + node.edgeCount] contains child node indices. Annotation ranges use the same extent convention.

WireSchema
,
(alias template) images_wired_isobmff.wireSchemaOf = sparkles.wired.schema.wireSchemaOf(F, T)

Complete CTFE schema of T under format F.

wireSchemaOf
;
// --------------------------------------------------------------------------- // A big-endian, fixed-layout walk over the shipped schema (same in all three // programs of this experiment) // --------------------------------------------------------------------------- /// Byte size of the subtree at `index`, or -1 when the schema gives none. /// Takes the schema by value: as an `in` parameter, CTFE fails on DMD and crashes LDC. long
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(const
(struct) sparkles.wired.schema.WireSchema

Flat compile-time schema arena. Node zero is always the root.

edges[node.firstEdge .. node.firstEdge + node.edgeCount] contains child node indices. Annotation ranges use the same extent convention.

WireSchema
(parameter) const(sparkles.wired.schema.WireSchema) schema
schema
,
(alias) object.size_t = ulong
size_t
(parameter) ulong index
index
) @safe pure nothrow
{ const
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
=
(parameter) const(sparkles.wired.schema.WireSchema) schema
schema
.
(field) sparkles.wired.schema.SchemaNode[] sparkles.wired.schema.WireSchema.nodes
nodes
[
(parameter) ulong index
index
];
switch (
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) sparkles.wired.schema.NodeKind sparkles.wired.schema.SchemaNode.kind
kind
)
{ case
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.scalar = cast(ubyte)0u
scalar
:
return
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) sparkles.wired.schema.ScalarKind sparkles.wired.schema.SchemaNode.scalarKind
scalarKind
==
(enum) sparkles.wired.schema.ScalarKind

Scalar distinctions which can affect a format's wire representation.

ScalarKind
.
(enum value) sparkles.wired.schema.ScalarKind.unsignedInteger = 3
unsignedInteger
||
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) sparkles.wired.schema.ScalarKind sparkles.wired.schema.SchemaNode.scalarKind
scalarKind
==
(enum) sparkles.wired.schema.ScalarKind

Scalar distinctions which can affect a format's wire representation.

ScalarKind
.
(enum value) sparkles.wired.schema.ScalarKind.signedInteger = 2
signedInteger
||
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) sparkles.wired.schema.ScalarKind sparkles.wired.schema.SchemaNode.scalarKind
scalarKind
==
(enum) sparkles.wired.schema.ScalarKind

Scalar distinctions which can affect a format's wire representation.

ScalarKind
.
(enum value) sparkles.wired.schema.ScalarKind.character = 5
character
?
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) ushort sparkles.wired.schema.SchemaNode.scalarBits

scalar storage width where it constrains wire values

scalarBits
/ 8 : -1;
case
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.enumeration = 1
enumeration
:
return
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) ushort sparkles.wired.schema.SchemaNode.scalarBits

scalar storage width where it constrains wire values

scalarBits
?
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) ushort sparkles.wired.schema.SchemaNode.scalarBits

scalar storage width where it constrains wire values

scalarBits
/ 8 : -1;
case
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.staticArray = 5
staticArray
:
const
(local variable) const(long) element
element
=
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(parameter) const(sparkles.wired.schema.WireSchema) schema
schema
,
(parameter) const(sparkles.wired.schema.WireSchema) schema
schema
.
(field) ulong[] sparkles.wired.schema.WireSchema.edges
edges
[
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) ulong sparkles.wired.schema.SchemaNode.firstEdge

range in WireSchema.edges

firstEdge
]);
return
(local variable) const(long) element
element
< 0 ? -1 :
(local variable) const(long) element
element
* cast(long)
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) ulong sparkles.wired.schema.SchemaNode.staticLength

T[N] length, zero otherwise

staticLength
;
case
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.aggregate = 2
aggregate
:
long
(local variable) long total
total
;
foreach (
(parameter) const(ulong) edge
edge
;
(parameter) const(sparkles.wired.schema.WireSchema) schema
schema
.
(field) ulong[] sparkles.wired.schema.WireSchema.edges
edges
[
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) ulong sparkles.wired.schema.SchemaNode.firstEdge

range in WireSchema.edges

firstEdge
..
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) ulong sparkles.wired.schema.SchemaNode.firstEdge

range in WireSchema.edges

firstEdge
+
(local variable) const(sparkles.wired.schema.SchemaNode) node
node
.
(field) ulong sparkles.wired.schema.SchemaNode.edgeCount

range in WireSchema.edges

edgeCount
])
{ const
(local variable) const(long) field
field
=
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(parameter) const(sparkles.wired.schema.WireSchema) schema
schema
,
(local variable) const(ulong) edge
edge
);
if (
(local variable) const(long) field
field
< 0)
return -1;
(local variable) long total
total
+=
(local variable) const(long) field
field
;
} return
(local variable) long total
total
;
default: return -1; // sequences, maps, unions, strings: the schema has no size } } /// Format marker. Its schema hook admits only fixed-size shapes; the byte /// order is a property of the marker, since `SchemaNode` has no such field. struct
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
{ template
(template) images_wired_isobmff.BeFixed.validateWireSchema(T, alias schema)
validateWireSchema
(T, alias schema)
{ enum bool
(constant) bool images_wired_isobmff.BeFixed.validateWireSchema!(images_wired_isobmff.FullBoxHeader, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FullBoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)8u, NullAwareKind.none, "ubyte", "version_", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("version_", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ubyte[3]", "flags", null, true, false, 2LU, 1LU, 18446744073709551615LU, 3LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)8u, NullAwareKind.none, "ubyte", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], null, ["version_", "flags"])) = true
validateWireSchema
=
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(constant) sparkles.wired.schema.WireSchema sparkles.wired.schema.rawWireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.FullBoxHeader) = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FullBoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)8u, NullAwareKind.none, "ubyte", "version_", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("version_", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ubyte[3]", "flags", null, true, false, 2LU, 1LU, 18446744073709551615LU, 3LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)8u, NullAwareKind.none, "ubyte", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], null, ["version_", "flags"])

The schema of T under F before the format's validation hook runs.

A format projects its per-type sidecar from this arena, so the hook may consult that projection for every type it reaches without re-entering wireSchemaOf. Keyed by the two types alone: one build per pair.

schema
, 0) >= 0;
} } enum
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
: ubyte
{
(enum value) images_wired_isobmff.BinErrorKind.none = cast(ubyte)0u
none
,
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(enum value) images_wired_isobmff.BinErrorKind.notAMember = 2
notAMember
,
(enum value) images_wired_isobmff.BinErrorKind.checkFailed = 3
checkFailed
,
(enum value) images_wired_isobmff.BinErrorKind.badSize = 4
badSize
,
(enum value) images_wired_isobmff.BinErrorKind.badVersion = 5
badVersion
,
(enum value) images_wired_isobmff.BinErrorKind.badReference = 6
badReference
,
(enum value) images_wired_isobmff.BinErrorKind.duplicate = 7
duplicate
,
} struct
(struct) images_wired_isobmff.BinError
BinError
{
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
(field) images_wired_isobmff.BinErrorKind images_wired_isobmff.BinError.kind
kind
;
(alias) object.size_t = ulong
size_t
(field) ulong images_wired_isobmff.BinError.offset
offset
;
(alias) object.string = string
string
(field) string images_wired_isobmff.BinError.what
what
;
} alias
(alias) images_wired_isobmff.BinResult!(images_wired_isobmff.Heif) = sparkles.base.expected.Expected!(Heif, BinError, Abort)
BinResult
(T) =
(struct) sparkles.base.expected.Expected!(images_wired_isobmff.Heif, images_wired_isobmff.BinError, sparkles.base.expected.Abort)

``Expected!(T, E) is a type that represents either success or failure.

Type T is used for success value. If T is void, then Expected can only hold error value and is considered a success when there is no error value.

Type E is used for error value. The default type for the error value is string.

Default behavior of Expected can be modified by the Hook template parameter.

@paramT represents type of the expected value@paramE represents type of the error value.@paramHook defines the Expected type behavior
Expected
!(
(alias) T = images_wired_isobmff.Heif
T
,
(struct) images_wired_isobmff.BinError
BinError
);
ulong
ulong images_wired_isobmff.readBe(in ubyte[] bytes, ulong at, ulong width) pure nothrow @nogc @safe
readBe
(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
,
(alias) object.size_t = ulong
size_t
(parameter) ulong at
at
,
(alias) object.size_t = ulong
size_t
(parameter) ulong width
width
) @safe pure nothrow @nogc
{ ulong
(local variable) ulong value
value
;
foreach (
(parameter) const(ubyte) b
b
;
(parameter) const(ubyte[]) bytes
bytes
[
(parameter) ulong at
at
..
(parameter) ulong at
at
+
(parameter) ulong width
width
])
(local variable) ulong value
value
= (
(local variable) ulong value
value
<< 8) |
(local variable) const(ubyte) b
b
;
return
(local variable) ulong value
value
;
} /// Reads schema node `index` into `value`, in lockstep with the D type.
(struct) images_wired_isobmff.BinError
BinError
images_wired_isobmff.BinError images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU)(ref images_wired_isobmff.FileTypeFixed value, in ubyte[] bytes, ref ulong pos, string path) pure nothrow @safe

Reads schema node index into value, in lockstep with the D type.

readNode
(V, alias schema, size_t index)(ref
(alias) V = images_wired_isobmff.FileTypeFixed
V
(parameter) images_wired_isobmff.FileTypeFixed value
value
, in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
,
ref
(alias) object.size_t = ulong
size_t
(parameter) ulong pos
pos
,
(alias) object.string = string
string
(parameter) string path
path
)
{ enum
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).node = SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
=
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.FileTypeFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"])
schema
.
(field) sparkles.wired.schema.SchemaNode[] sparkles.wired.schema.WireSchema.nodes
nodes
[
(constant) ulong images_wired_isobmff.index = 0LU
index
];
static if (
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).node = SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) sparkles.wired.schema.NodeKind sparkles.wired.schema.SchemaNode.kind
kind
==
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.aggregate = 2
aggregate
)
{ static foreach (i; 0 .. V.tupleof.length) {{ enum
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).child = 1LU
child
=
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.FileTypeFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"])
schema
.
(field) ulong[] sparkles.wired.schema.WireSchema.edges
edges
[
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).node = SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) ulong sparkles.wired.schema.SchemaNode.firstEdge

range in WireSchema.edges

firstEdge
+
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
i
];
const
(local variable) const(string) fieldPath
fieldPath
=
(parameter) string path
path
.
(field) ulong string.length
length
?
(parameter) string path
path
~ "." ~ schema.nodes[child].name :
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.FileTypeFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"])
schema
.
(field) sparkles.wired.schema.SchemaNode[] sparkles.wired.schema.WireSchema.nodes
nodes
[
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).child = 1LU
child
].
(field) string sparkles.wired.schema.SchemaNode.name

field key, enum-member name, or union variant name

name
;
const
(local variable) const(ulong) fieldStart
fieldStart
=
(parameter) ulong pos
pos
;
auto
(local variable) images_wired_isobmff.BinError e
e
=
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).child = 1LU
readNode
!(typeof(
(field) char[4] images_wired_isobmff.FileTypeFixed.majorBrand
V
.tupleof[
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
i
]),
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.FileTypeFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"])
schema
,
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).child = 1LU
child
)(
(parameter) images_wired_isobmff.FileTypeFixed value
value
.tupleof[
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
i
],
(parameter) const(ubyte[]) bytes
bytes
,
(parameter) ulong pos
pos
,
(local variable) const(string) fieldPath
fieldPath
);
if (
(local variable) images_wired_isobmff.BinError e
e
.
(field) images_wired_isobmff.BinErrorKind images_wired_isobmff.BinError.kind
kind
!=
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.none = cast(ubyte)0u
none
)
return
(local variable) images_wired_isobmff.BinError e
e
;
auto
(local variable) sparkles.wired.policy.WireCheckFailure[] failures
failures
=
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
wireCheckFailures
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(alias) V = images_wired_isobmff.FileTypeFixed
V
.tupleof[
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
i
])(
(parameter) images_wired_isobmff.FileTypeFixed value
value
.tupleof[
(constant) ulong images_wired_isobmff.readNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
i
]);
if (
(local variable) sparkles.wired.policy.WireCheckFailure[] failures
failures
.
(field) ulong sparkles.wired.policy.WireCheckFailure[].length
length
)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.checkFailed = 3
checkFailed
,
(local variable) const(ulong) fieldStart
fieldStart
,
(local variable) const(string) fieldPath
fieldPath
~ ": " ~
(local variable) sparkles.wired.policy.WireCheckFailure[] failures
failures
[0].
(field) string sparkles.wired.policy.WireCheckFailure.reason
reason
);
}} return
(struct) images_wired_isobmff.BinError
BinError
.
(constant) images_wired_isobmff.BinError images_wired_isobmff.BinError.init = BinError(BinErrorKind.none, 0LU, null)
init
;
} else static if (
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(uint, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "BoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "type", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], [SchemaAnnotation("WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)", "WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)")], ["size", "type"]), 1LU).node = SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) sparkles.wired.schema.NodeKind sparkles.wired.schema.SchemaNode.kind
kind
==
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.staticArray = 5
staticArray
)
{ enum
(constant) ulong images_wired_isobmff.readNode!(uint[3], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"]), 4LU).child = 5LU
child
=
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.HandlerFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"])
schema
.
(field) ulong[] sparkles.wired.schema.WireSchema.edges
edges
[
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(char[4], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"]), 2LU).node = SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) ulong sparkles.wired.schema.SchemaNode.firstEdge

range in WireSchema.edges

firstEdge
];
foreach (
(local variable) ulong k
k
; 0 ..
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(uint[3], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"]), 4LU).node = SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) ulong sparkles.wired.schema.SchemaNode.staticLength

T[N] length, zero otherwise

staticLength
)
{ auto
(local variable) images_wired_isobmff.BinError e
e
=
(constant) ulong images_wired_isobmff.readNode!(char[4], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"]), 2LU).child = 3LU
readNode
!(typeof(
(parameter) uint[3] value
value
[0]),
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.HandlerFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"])
schema
,
(constant) ulong images_wired_isobmff.readNode!(uint[3], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"]), 4LU).child = 5LU
child
)(
(parameter) uint[3] value
value
[
(local variable) ulong k
k
],
(parameter) const(ubyte[]) bytes
bytes
,
(parameter) ulong pos
pos
,
(parameter) string path
path
);
if (
(local variable) images_wired_isobmff.BinError e
e
.
(field) images_wired_isobmff.BinErrorKind images_wired_isobmff.BinError.kind
kind
!=
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.none = cast(ubyte)0u
none
)
return
(local variable) images_wired_isobmff.BinError e
e
;
} return
(struct) images_wired_isobmff.BinError
BinError
.
(constant) images_wired_isobmff.BinError images_wired_isobmff.BinError.init = BinError(BinErrorKind.none, 0LU, null)
init
;
} else static if (
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(uint, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "BoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "type", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], [SchemaAnnotation("WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)", "WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)")], ["size", "type"]), 1LU).node = SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) sparkles.wired.schema.NodeKind sparkles.wired.schema.SchemaNode.kind
kind
==
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.enumeration = 1
enumeration
)
{ const raw = cast(OriginalType!V) readBe(bytes, pos, node.scalarBits / 8); static foreach (member; EnumMembers!V) if (raw == member) { value = member; pos += node.scalarBits / 8; return BinError.init; } return BinError(BinErrorKind.notAMember, pos, path); } else {
(parameter) uint value
value
= cast(
(alias) V = uint
V
)
ulong images_wired_isobmff.readBe(in ubyte[] bytes, ulong at, ulong width) pure nothrow @nogc @safe
readBe
(
(parameter) const(ubyte[]) bytes
bytes
,
(parameter) ulong pos
pos
,
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(uint, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "BoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "type", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], [SchemaAnnotation("WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)", "WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)")], ["size", "type"]), 1LU).node = SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) ushort sparkles.wired.schema.SchemaNode.scalarBits

scalar storage width where it constrains wire values

scalarBits
/ 8);
(parameter) ulong pos
pos
+=
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.readNode!(uint, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "BoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "type", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], [SchemaAnnotation("WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)", "WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)")], ["size", "type"]), 1LU).node = SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) ushort sparkles.wired.schema.SchemaNode.scalarBits

scalar storage width where it constrains wire values

scalarBits
/ 8;
return
(struct) images_wired_isobmff.BinError
BinError
.
(constant) images_wired_isobmff.BinError images_wired_isobmff.BinError.init = BinError(BinErrorKind.none, 0LU, null)
init
;
} } /// Decodes a fixed record at `at`: one bounds check, the schema walk with /// field checks, then the type-level `@WireCheck`s.
(alias) images_wired_isobmff.BinResult!(images_wired_isobmff.ItemInfoEntryV2) = sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort)
BinResult
!
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) images_wired_isobmff.decodeFixed!(images_wired_isobmff.ItemInfoEntryV2)(in ubyte[] bytes, ulong at) pure nothrow @safe

Decodes a fixed record at at: one bounds check, the schema walk with field checks, then the type-level @WireChecks.

decodeFixed
(T)(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
,
(alias) object.size_t = ulong
size_t
(parameter) ulong at
at
)
{ enum
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.ItemInfoEntryV2).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ItemInfoEntryV2", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "itemId", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("itemId", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "protectionIndex", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("protectionIndex", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "itemType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU, 4LU], [SchemaAnnotation("WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)", "WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)")], ["itemId", "protectionIndex", "itemType"])
schema
=
(template instance) sparkles.wired.schema.wireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.ItemInfoEntryV2)
wireSchemaOf
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(alias) T = images_wired_isobmff.FileTypeFixed
T
);
enum
(alias) object.size_t = ulong
size_t
(constant) ulong images_wired_isobmff.decodeFixed!(images_wired_isobmff.ItemInfoEntryV2).size = 8LU
size
=
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.ItemInfoEntryV2).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ItemInfoEntryV2", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "itemId", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("itemId", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "protectionIndex", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("protectionIndex", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "itemType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU, 4LU], [SchemaAnnotation("WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)", "WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)")], ["itemId", "protectionIndex", "itemType"])
schema
, 0);
if (
(parameter) ulong at
at
>
(parameter) const(ubyte[]) bytes
bytes
.
(field) ulong const(ubyte[]).length
length
||
(parameter) const(ubyte[]) bytes
bytes
.
(field) ulong const(ubyte[]).length
length
-
(parameter) ulong at
at
<
(constant) ulong images_wired_isobmff.decodeFixed!(images_wired_isobmff.ItemInfoEntryV2).size = 8LU
size
)
return
sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) sparkles.base.expected.err!(images_wired_isobmff.ItemInfoEntryV2, sparkles.base.expected.Abort, images_wired_isobmff.BinError)(images_wired_isobmff.BinError err) pure nothrow @nogc @safe

Creates an Expected object from an error value, with type inference.

Examples

// implicit void value type
{
    auto res = err("foo");
    static assert(is(typeof(res) == Expected!(void, string)));
    assert(!res);
    assert(res.error == "foo");
}

// bool
{
    auto res = err!int("42");
    static assert(is(typeof(res) == Expected!(int, string)));
    assert(!res);
    assert(res.error == "42");
}

// other error type
{
    auto res = err!bool(42);
    static assert(is(typeof(res) == Expected!(bool, int)));
    assert(!res);
    assert(res.error == 42);
}
err
!
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
(
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(parameter) ulong at
at
,
(struct) images_wired_isobmff.ItemInfoEntryV2

§8.11.6 infe version 2, after FullBox and before the name.

T
.
(constant) string images_wired_isobmff.ItemInfoEntryV2.stringof = "ItemInfoEntryV2"
stringof
));
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
(local variable) images_wired_isobmff.ItemInfoEntryV2 value
value
;
(alias) object.size_t = ulong
size_t
(local variable) ulong pos
pos
=
(parameter) ulong at
at
;
auto
(local variable) images_wired_isobmff.BinError e
e
=
images_wired_isobmff.BinError images_wired_isobmff.readNode!(images_wired_isobmff.ItemInfoEntryV2, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ItemInfoEntryV2", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "itemId", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("itemId", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "protectionIndex", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("protectionIndex", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "itemType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU, 4LU], [SchemaAnnotation("WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)", "WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)")], ["itemId", "protectionIndex", "itemType"]), 0LU)(ref images_wired_isobmff.ItemInfoEntryV2 value, in ubyte[] bytes, ref ulong pos, string path) pure nothrow @safe

Reads schema node index into value, in lockstep with the D type.

readNode
!(
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
,
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.decodeFixed!(images_wired_isobmff.ItemInfoEntryV2).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ItemInfoEntryV2", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "itemId", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("itemId", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "protectionIndex", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("protectionIndex", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "itemType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU, 4LU], [SchemaAnnotation("WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)", "WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)")], ["itemId", "protectionIndex", "itemType"])
schema
, 0)(
(local variable) images_wired_isobmff.ItemInfoEntryV2 value
value
,
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong pos
pos
, "");
if (
(local variable) images_wired_isobmff.BinError e
e
.
(field) images_wired_isobmff.BinErrorKind images_wired_isobmff.BinError.kind
kind
!=
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.none = cast(ubyte)0u
none
)
{
(local variable) images_wired_isobmff.BinError e
e
.
(field) string images_wired_isobmff.BinError.what
what
=
(struct) images_wired_isobmff.ItemInfoEntryV2

§8.11.6 infe version 2, after FullBox and before the name.

T
.
(constant) string images_wired_isobmff.ItemInfoEntryV2.stringof = "ItemInfoEntryV2"
stringof
~ "." ~
(local variable) images_wired_isobmff.BinError e
e
.
(field) string images_wired_isobmff.BinError.what
what
;
return
sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) sparkles.base.expected.err!(images_wired_isobmff.ItemInfoEntryV2, sparkles.base.expected.Abort, images_wired_isobmff.BinError)(ref images_wired_isobmff.BinError err) pure nothrow @nogc @safe

Creates an Expected object from an error value, with type inference.

Examples

// implicit void value type
{
    auto res = err("foo");
    static assert(is(typeof(res) == Expected!(void, string)));
    assert(!res);
    assert(res.error == "foo");
}

// bool
{
    auto res = err!int("42");
    static assert(is(typeof(res) == Expected!(int, string)));
    assert(!res);
    assert(res.error == "42");
}

// other error type
{
    auto res = err!bool(42);
    static assert(is(typeof(res) == Expected!(bool, int)));
    assert(!res);
    assert(res.error == 42);
}
err
!
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
(
(local variable) images_wired_isobmff.BinError e
e
);
} auto
(local variable) sparkles.wired.policy.WireCheckFailure[] failures
failures
=
sparkles.wired.policy.WireCheckFailure[] sparkles.wired.policy.wireCheckFailures!(images_wired_isobmff.BeFixed, images_wired_isobmff.ItemInfoEntryV2, images_wired_isobmff.ItemInfoEntryV2)(in images_wired_isobmff.ItemInfoEntryV2 value) pure nothrow @nogc @safe

Runs the shared four-protocol check vocabulary at a type or field site. static because symbol may alias a field: without it the instantiation would need an instance of the field's aggregate as its context.

wireCheckFailures
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
)(
(local variable) images_wired_isobmff.ItemInfoEntryV2 value
value
);
if (
(local variable) sparkles.wired.policy.WireCheckFailure[] failures
failures
.
(field) ulong sparkles.wired.policy.WireCheckFailure[].length
length
)
return
sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) sparkles.base.expected.err!(images_wired_isobmff.ItemInfoEntryV2, sparkles.base.expected.Abort, images_wired_isobmff.BinError)(images_wired_isobmff.BinError err) pure nothrow @nogc @safe

Creates an Expected object from an error value, with type inference.

Examples

// implicit void value type
{
    auto res = err("foo");
    static assert(is(typeof(res) == Expected!(void, string)));
    assert(!res);
    assert(res.error == "foo");
}

// bool
{
    auto res = err!int("42");
    static assert(is(typeof(res) == Expected!(int, string)));
    assert(!res);
    assert(res.error == "42");
}

// other error type
{
    auto res = err!bool(42);
    static assert(is(typeof(res) == Expected!(bool, int)));
    assert(!res);
    assert(res.error == 42);
}
err
!
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
(
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.checkFailed = 3
checkFailed
,
(parameter) ulong at
at
,
(struct) images_wired_isobmff.ItemInfoEntryV2

§8.11.6 infe version 2, after FullBox and before the name.

T
.
(constant) string images_wired_isobmff.ItemInfoEntryV2.stringof = "ItemInfoEntryV2"
stringof
~ ": " ~
(local variable) sparkles.wired.policy.WireCheckFailure[] failures
failures
[0].
(field) string sparkles.wired.policy.WireCheckFailure.reason
reason
));
return
sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) sparkles.base.expected.ok!(images_wired_isobmff.BinError, sparkles.base.expected.Abort, images_wired_isobmff.ItemInfoEntryV2)(ref images_wired_isobmff.ItemInfoEntryV2 value) pure nothrow @nogc @safe

Creates an Expected object from an expected value, with type inference.

ok
!
(struct) images_wired_isobmff.BinError
BinError
(
(local variable) images_wired_isobmff.ItemInfoEntryV2 value
value
);
} void
void images_wired_isobmff.writeNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU)(in images_wired_isobmff.FileTypeFixed value, ref ubyte[] output) pure nothrow @safe
writeNode
(V, alias schema, size_t index)(in
(alias) V = images_wired_isobmff.FileTypeFixed
V
(parameter) const(images_wired_isobmff.FileTypeFixed) value
value
, ref ubyte[]
(parameter) ubyte[] output
output
)
{ enum
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.writeNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).node = SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
=
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.FileTypeFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"])
schema
.
(field) sparkles.wired.schema.SchemaNode[] sparkles.wired.schema.WireSchema.nodes
nodes
[
(constant) ulong images_wired_isobmff.index = 0LU
index
];
static if (
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.writeNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).node = SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) sparkles.wired.schema.NodeKind sparkles.wired.schema.SchemaNode.kind
kind
==
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.aggregate = 2
aggregate
)
{ static foreach (i; 0 .. V.tupleof.length)
void images_wired_isobmff.writeNode!(char[4], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 1LU)(in char[4] value, ref ubyte[] output) pure nothrow @safe
writeNode
!(typeof(
(field) char[4] images_wired_isobmff.FileTypeFixed.majorBrand
V
.tupleof[
(constant) ulong images_wired_isobmff.writeNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
i
]),
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.FileTypeFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"])
schema
,
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.FileTypeFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"])
schema
.
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.BoxHeader).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "BoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "type", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], [SchemaAnnotation("WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)", "WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)")], ["size", "type"])
edges
[
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.writeNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).node = SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) ulong sparkles.wired.schema.SchemaNode.firstEdge

range in WireSchema.edges

firstEdge
+
(constant) ulong images_wired_isobmff.writeNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
i
])(
(parameter) const(images_wired_isobmff.FileTypeFixed) value
value
.tupleof[
(constant) ulong images_wired_isobmff.writeNode!(images_wired_isobmff.FileTypeFixed, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FileTypeFixed", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "majorBrand", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("majorBrand", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "minorVersion", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("minorVersion", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 3LU, 2LU], null, ["majorBrand", "minorVersion"]), 0LU).i = 0LU
i
],
(parameter) ubyte[] output
output
);
} else static if (
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.writeNode!(uint, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "BoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "type", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], [SchemaAnnotation("WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)", "WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)")], ["size", "type"]), 1LU).node = SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) sparkles.wired.schema.NodeKind sparkles.wired.schema.SchemaNode.kind
kind
==
(enum) sparkles.wired.schema.NodeKind

Structural node vocabulary shared by format walkers and derivations.

NodeKind
.
(enum value) sparkles.wired.schema.NodeKind.staticArray = 5
staticArray
)
{ foreach (
(local variable) ulong k
k
; 0 ..
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.writeNode!(uint[3], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"]), 4LU).node = SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) ulong sparkles.wired.schema.SchemaNode.staticLength

T[N] length, zero otherwise

staticLength
)
void images_wired_isobmff.writeNode!(const(uint), WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"]), 5LU)(in uint value, ref ubyte[] output) pure nothrow @safe
writeNode
!(typeof(
(parameter) const(uint[3]) value
value
[0]),
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.HandlerFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"])
schema
,
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.HandlerFixed).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"])
schema
.
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.FullBoxHeader).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FullBoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)8u, NullAwareKind.none, "ubyte", "version_", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("version_", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ubyte[3]", "flags", null, true, false, 2LU, 1LU, 18446744073709551615LU, 3LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)8u, NullAwareKind.none, "ubyte", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], null, ["version_", "flags"])
edges
[
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.writeNode!(uint[3], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "HandlerFixed", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "preDefined", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("preDefined", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "handlerType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("handlerType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 4LU, 3LU, 5LU], [SchemaAnnotation("WireCheck!(isOneOf, \"\", AnyFormat)", "WireCheck!(isOneOf, \"\", AnyFormat)")], ["preDefined", "handlerType", "reserved"]), 4LU).node = SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "uint[3]", "reserved", null, true, false, 4LU, 1LU, 18446744073709551615LU, 3LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("reserved", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.writeNode!(ubyte[3], WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "FullBoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)8u, NullAwareKind.none, "ubyte", "version_", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("version_", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ubyte[3]", "flags", null, true, false, 2LU, 1LU, 18446744073709551615LU, 3LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)8u, NullAwareKind.none, "ubyte", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], null, ["version_", "flags"]), 2LU).node = SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ubyte[3]", "flags", null, true, false, 2LU, 1LU, 18446744073709551615LU, 3LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("flags", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
firstEdge
])(
(parameter) const(uint[3]) value
value
[
(local variable) ulong k
k
],
(parameter) ubyte[] output
output
);
} else { const ulong
(local variable) const(ulong) raw
raw
= cast(ulong)
(parameter) const(uint) value
value
;
foreach_reverse (
(local variable) int k
k
; 0 ..
(constant) sparkles.wired.schema.SchemaNode images_wired_isobmff.writeNode!(uint, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "BoxHeader", "", null, false, false, 0LU, 2LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "type", null, true, false, 2LU, 1LU, 18446744073709551615LU, 4LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("type", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU], [SchemaAnnotation("WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)", "WireCheck!(isFourCc, \"box type is not printable\", AnyFormat)")], ["size", "type"]), 1LU).node = SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)32u, NullAwareKind.none, "uint", "size", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 0LU, PolicySnapshot(FieldPolicy("size", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))
node
.
(field) ushort sparkles.wired.schema.SchemaNode.scalarBits

scalar storage width where it constrains wire values

scalarBits
/ 8)
(parameter) ubyte[] output
output
~= cast(ubyte)(
(local variable) const(ulong) raw
raw
>> (8 *
(local variable) int k
k
));
} } /// Encodes a fixed record after its checks pass, as expressiveness §6.4 /// requires of encode. Returns the first failure's reason, or null.
(alias) object.string = string
string
string images_wired_isobmff.encodeFixed!(images_wired_isobmff.ItemInfoEntryV2)(in images_wired_isobmff.ItemInfoEntryV2 value, ref ubyte[] output) pure nothrow @safe

Encodes a fixed record after its checks pass, as expressiveness §6.4 requires of encode. Returns the first failure's reason, or null.

encodeFixed
(T)(in
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
(parameter) const(images_wired_isobmff.ItemInfoEntryV2) value
value
, ref ubyte[]
(parameter) ubyte[] output
output
)
{ enum
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.ItemInfoEntryV2).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ItemInfoEntryV2", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "itemId", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("itemId", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "protectionIndex", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("protectionIndex", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "itemType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU, 4LU], [SchemaAnnotation("WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)", "WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)")], ["itemId", "protectionIndex", "itemType"])
schema
=
(template instance) sparkles.wired.schema.wireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.ItemInfoEntryV2)
wireSchemaOf
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(alias) T = images_wired_isobmff.FileTypeFixed
T
);
static foreach (i; 0 .. T.tupleof.length) foreach (
(parameter) sparkles.wired.policy.WireCheckFailure failure
failure
;
(constant) ulong images_wired_isobmff.encodeFixed!(images_wired_isobmff.ItemInfoEntryV2).i = 0LU
wireCheckFailures
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
.tupleof[
(constant) ulong images_wired_isobmff.encodeFixed!(images_wired_isobmff.ItemInfoEntryV2).i = 0LU
i
])(
(parameter) const(images_wired_isobmff.ItemInfoEntryV2) value
value
.tupleof[
(constant) ulong images_wired_isobmff.encodeFixed!(images_wired_isobmff.ItemInfoEntryV2).i = 0LU
i
]))
return
(local variable) sparkles.wired.policy.WireCheckFailure failure
failure
.
(field) string sparkles.wired.policy.WireCheckFailure.reason
reason
;
foreach (
(parameter) sparkles.wired.policy.WireCheckFailure failure
failure
;
sparkles.wired.policy.WireCheckFailure[] sparkles.wired.policy.wireCheckFailures!(images_wired_isobmff.BeFixed, images_wired_isobmff.ItemInfoEntryV2, images_wired_isobmff.ItemInfoEntryV2)(in images_wired_isobmff.ItemInfoEntryV2 value) pure nothrow @nogc @safe

Runs the shared four-protocol check vocabulary at a type or field site. static because symbol may alias a field: without it the instantiation would need an instance of the field's aggregate as its context.

wireCheckFailures
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
)(
(parameter) const(images_wired_isobmff.ItemInfoEntryV2) value
value
))
return
(local variable) sparkles.wired.policy.WireCheckFailure failure
failure
.
(field) string sparkles.wired.policy.WireCheckFailure.reason
reason
;
void images_wired_isobmff.writeNode!(images_wired_isobmff.ItemInfoEntryV2, WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ItemInfoEntryV2", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "itemId", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("itemId", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "protectionIndex", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("protectionIndex", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "itemType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU, 4LU], [SchemaAnnotation("WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)", "WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)")], ["itemId", "protectionIndex", "itemType"]), 0LU)(in images_wired_isobmff.ItemInfoEntryV2 value, ref ubyte[] output) pure nothrow @safe
writeNode
!(
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
,
(constant) sparkles.wired.schema.WireSchema images_wired_isobmff.encodeFixed!(images_wired_isobmff.ItemInfoEntryV2).schema = WireSchema([SchemaNode(NodeKind.aggregate, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "ItemInfoEntryV2", "", null, false, false, 0LU, 3LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy(null, null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "itemId", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 0LU, 1LU, PolicySnapshot(FieldPolicy("itemId", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.unsignedInteger, cast(ushort)16u, NullAwareKind.none, "ushort", "protectionIndex", null, true, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("protectionIndex", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.staticArray, ScalarKind.none, cast(ushort)0u, NullAwareKind.none, "char[4]", "itemType", null, true, false, 3LU, 1LU, 18446744073709551615LU, 4LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name)), SchemaNode(NodeKind.scalar, ScalarKind.character, cast(ushort)8u, NullAwareKind.none, "char", "", null, false, false, 0LU, 0LU, 18446744073709551615LU, 0LU, 1LU, 0LU, PolicySnapshot(FieldPolicy("itemType", null, false, false, false, WireSkip.never, WireInvalid.reject, MatchStrategy.exactlyOne, [false, false, false], [CaseStyle.original, CaseStyle.original, CaseStyle.original], [false, false, false], [Repr.name, Repr.name, Repr.name]), CaseStyle.original, Repr.name))], [1LU, 2LU, 3LU, 4LU], [SchemaAnnotation("WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)", "WireCheck!(isBetween, \"item_ID 0 is reserved\", AnyFormat)")], ["itemId", "protectionIndex", "itemType"])
schema
, 0)(
(parameter) const(images_wired_isobmff.ItemInfoEntryV2) value
value
,
(parameter) ubyte[] output
output
);
return null; } // --------------------------------------------------------------------------- // ISO/IEC 14496-12 fixed parts, as quoted by the MPEG reference software and // libavif's parser // --------------------------------------------------------------------------- bool
bool images_wired_isobmff.isFourCc(in char[4] t) pure nothrow @nogc @safe
isFourCc
(in char[4]
(parameter) const(char[4]) t
t
) @safe pure nothrow @nogc
{ foreach (
(parameter) const(char) c
c
;
(parameter) const(char[4]) t
t
)
if (
(local variable) const(char) c
c
< 0x20 ||
(local variable) const(char) c
c
> 0x7E)
return false; return true; } /// §4.2.2: "unsigned int(32) size; unsigned int(32) type = boxtype;" struct
images_wired_isobmff.BoxHeader BoxHeader
BoxHeader
{ uint
(field) uint images_wired_isobmff.BoxHeader.size
size
;
@
(template instance) sparkles.wired.policy.WireCheck!(isFourCc, "box type is not printable", sparkles.metadata.wire.AnyFormat)
WireCheck
!(
bool images_wired_isobmff.isFourCc(in char[4] t) pure nothrow @nogc @safe
isFourCc
, "box type is not printable") char[4]
(field) char[4] images_wired_isobmff.BoxHeader.type
type
;
} /// §4.2.2 FullBox: "unsigned int(8) version; bit(24) flags;" There is no /// 24-bit leaf, so the flags are three bytes. struct
(struct) images_wired_isobmff.FullBoxHeader

§4.2.2 FullBox: "unsigned int(8) version; bit(24) flags;" There is no 24-bit leaf, so the flags are three bytes.

FullBoxHeader
{ ubyte
(field) ubyte images_wired_isobmff.FullBoxHeader.version_
version_
;
ubyte[3]
(field) ubyte[3] images_wired_isobmff.FullBoxHeader.flags
flags
;
} /// §4.3 `ftyp`, before its compatible brands (which run to the box end). struct
images_wired_isobmff.FileTypeFixed FileTypeFixed
FileTypeFixed
{ char[4]
(field) char[4] images_wired_isobmff.FileTypeFixed.majorBrand
majorBrand
;
uint
(field) uint images_wired_isobmff.FileTypeFixed.minorVersion
minorVersion
;
} /// §8.4.3 `hdlr`, after FullBox and before the NUL-terminated name. struct
images_wired_isobmff.HandlerFixed HandlerFixed
HandlerFixed
{ @
(template instance) sparkles.wired.policy.WireCheck!(isOneOf, "", sparkles.metadata.wire.AnyFormat)
WireCheck
!(
(template) sparkles.wired.policy.isOneOf!0u

Declarative membership check usable as a WireCheck predicate.

isOneOf
!(0u)) uint
(field) uint images_wired_isobmff.HandlerFixed.preDefined
preDefined
;
char[4]
(field) char[4] images_wired_isobmff.HandlerFixed.handlerType
handlerType
;
uint[3]
(field) uint[3] images_wired_isobmff.HandlerFixed.reserved
reserved
;
} /// §8.11.6 `infe` version 2, after FullBox and before the name. struct
images_wired_isobmff.ItemInfoEntryV2 ItemInfoEntryV2
ItemInfoEntryV2
{ @
(template instance) sparkles.wired.policy.WireCheck!(isBetween, "item_ID 0 is reserved", sparkles.metadata.wire.AnyFormat)
WireCheck
!(
(template) sparkles.wired.policy.isBetween!(1, cast(ushort)65535u)

Declarative inclusive-bound check usable as a WireCheck predicate.

isBetween
!(1, ushort.max), "item_ID 0 is reserved") ushort
(field) ushort images_wired_isobmff.ItemInfoEntryV2.itemId
itemId
;
ushort
(field) ushort images_wired_isobmff.ItemInfoEntryV2.protectionIndex
protectionIndex
;
char[4]
(field) char[4] images_wired_isobmff.ItemInfoEntryV2.itemType
itemType
;
} /// ISO/IEC 23008-12 `ispe`, after FullBox. @
(template instance) sparkles.wired.policy.WireCheck!((e) => e.width > 0 && (e.height > 0), "ispe dimensions must be > 0", sparkles.metadata.wire.AnyFormat)
WireCheck
!(e => e.width > 0 && e.height > 0, "ispe dimensions must be > 0")
struct
(struct) images_wired_isobmff.ImageSpatialExtents

ISO/IEC 23008-12 ispe, after FullBox.

ImageSpatialExtents
{ uint
(field) uint images_wired_isobmff.ImageSpatialExtents.width
width
;
uint
(field) uint images_wired_isobmff.ImageSpatialExtents.height
height
;
} // --------------------------------------------------------------------------- // GAP: everything below is hand-written // --------------------------------------------------------------------------- /// A box located in the input: `[start, end)` with the payload after /// `headerSize` bytes. struct
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
{ char[4]
(field) char[4] images_wired_isobmff.Box.type
type
;
(alias) object.size_t = ulong
size_t
(field) ulong images_wired_isobmff.Box.start
start
;
(alias) object.size_t = ulong
size_t
(field) ulong images_wired_isobmff.Box.headerSize
headerSize
;
(alias) object.size_t = ulong
size_t
(field) ulong images_wired_isobmff.Box.end
end
;
bool
(field) bool images_wired_isobmff.Box.large

size was 1 and largesize followed

large
; /// size was 1 and largesize followed
bool
(field) bool images_wired_isobmff.Box.toEnd

size was 0

toEnd
; /// size was 0
ubyte[16]
(field) ubyte[16] images_wired_isobmff.Box.usertype

for uuid

usertype
; /// for `uuid`
(alias) object.size_t = ulong
size_t
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
() const @safe pure nothrow @nogc =>
(field) ulong images_wired_isobmff.Box.start
start
+
(field) ulong images_wired_isobmff.Box.headerSize
headerSize
;
} alias
(alias) images_wired_isobmff.fail!(images_wired_isobmff.Heif) = sparkles.base.expected.Expected!(Heif, BinError, Abort) images_wired_isobmff.fail(T)(images_wired_isobmff.BinErrorKind kind, ulong at, string what) pure nothrow @nogc @safe
fail
(T) = (
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
(parameter) images_wired_isobmff.BinErrorKind kind
kind
,
(alias) object.size_t = ulong
size_t
(parameter) ulong at
at
,
(alias) object.string = string
string
(parameter) string what
what
) =>
sparkles.base.expected.Expected!(Box, BinError, Abort) sparkles.base.expected.err!(images_wired_isobmff.Box, sparkles.base.expected.Abort, images_wired_isobmff.BinError)(images_wired_isobmff.BinError err) pure nothrow @nogc @safe

Creates an Expected object from an error value, with type inference.

Examples

// implicit void value type
{
    auto res = err("foo");
    static assert(is(typeof(res) == Expected!(void, string)));
    assert(!res);
    assert(res.error == "foo");
}

// bool
{
    auto res = err!int("42");
    static assert(is(typeof(res) == Expected!(int, string)));
    assert(!res);
    assert(res.error == "42");
}

// other error type
{
    auto res = err!bool(42);
    static assert(is(typeof(res) == Expected!(bool, int)));
    assert(!res);
    assert(res.error == 42);
}
err
!
(alias) T = images_wired_isobmff.Box
T
(
(struct) images_wired_isobmff.BinError
BinError
(
(parameter) images_wired_isobmff.BinErrorKind kind
kind
,
(parameter) ulong at
at
,
(parameter) string what
what
));
/// GAP: §4.2.2's header: size, type, then largesize if size == 1, then the /// 16-byte usertype if type is `uuid`. Size 0 extends to the end of the file /// and is legal only at the top level (libavif `avifROStreamReadBoxHeaderPartial`).
(alias) images_wired_isobmff.BinResult!(images_wired_isobmff.Box) = sparkles.base.expected.Expected!(Box, BinError, Abort)
BinResult
!
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
sparkles.base.expected.Expected!(Box, BinError, Abort) images_wired_isobmff.readBox(in ubyte[] bytes, ulong at, ulong parentEnd, bool topLevel)

GAP

§4.2.2's header: size, type, then largesize if size == 1, then the 16-byte usertype if type is uuid. Size 0 extends to the end of the file and is legal only at the top level (libavif avifROStreamReadBoxHeaderPartial).

readBox
(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
,
(alias) object.size_t = ulong
size_t
(parameter) ulong at
at
,
(alias) object.size_t = ulong
size_t
(parameter) ulong parentEnd
parentEnd
, bool
(parameter) bool topLevel
topLevel
)
{ auto
(local variable) sparkles.base.expected.Expected!(BoxHeader, BinError, Abort) h
h
=
sparkles.base.expected.Expected!(BoxHeader, BinError, Abort) images_wired_isobmff.decodeFixed!(images_wired_isobmff.BoxHeader)(in ubyte[] bytes, ulong at) pure nothrow @safe

Decodes a fixed record at at: one bounds check, the schema walk with field checks, then the type-level @WireChecks.

decodeFixed
!
(struct) images_wired_isobmff.BoxHeader

§4.2.2: "unsigned int(32) size; unsigned int(32) type = boxtype;"

BoxHeader
(
(parameter) const(ubyte[]) bytes
bytes
[0 ..
(parameter) ulong parentEnd
parentEnd
],
(parameter) ulong at
at
);
if (
(local variable) sparkles.base.expected.Expected!(BoxHeader, BinError, Abort) h
h
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.BoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
sparkles.base.expected.Expected!(Box, BinError, Abort) sparkles.base.expected.err!(images_wired_isobmff.Box, sparkles.base.expected.Abort, images_wired_isobmff.BinError)(ref images_wired_isobmff.BinError err) pure nothrow @nogc @safe

Creates an Expected object from an error value, with type inference.

Examples

// implicit void value type
{
    auto res = err("foo");
    static assert(is(typeof(res) == Expected!(void, string)));
    assert(!res);
    assert(res.error == "foo");
}

// bool
{
    auto res = err!int("42");
    static assert(is(typeof(res) == Expected!(int, string)));
    assert(!res);
    assert(res.error == "42");
}

// other error type
{
    auto res = err!bool(42);
    static assert(is(typeof(res) == Expected!(bool, int)));
    assert(!res);
    assert(res.error == 42);
}
err
!
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(
(local variable) sparkles.base.expected.Expected!(BoxHeader, BinError, Abort) h
h
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.BoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
);
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(local variable) images_wired_isobmff.Box box
box
;
(local variable) images_wired_isobmff.Box box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
=
(local variable) sparkles.base.expected.Expected!(BoxHeader, BinError, Abort) h
h
.
inout(images_wired_isobmff.BoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.BoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) char[4] images_wired_isobmff.BoxHeader.type
type
;
(local variable) images_wired_isobmff.Box box
box
.
(field) ulong images_wired_isobmff.Box.start
start
=
(parameter) ulong at
at
;
(alias) object.size_t = ulong
size_t
(local variable) ulong pos
pos
=
(parameter) ulong at
at
+ 8;
ulong
(local variable) ulong size
size
=
(local variable) sparkles.base.expected.Expected!(BoxHeader, BinError, Abort) h
h
.
inout(images_wired_isobmff.BoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.BoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) uint images_wired_isobmff.BoxHeader.size
size
;
if (
(local variable) ulong size
size
== 1)
{ if (
(parameter) ulong parentEnd
parentEnd
-
(local variable) ulong pos
pos
< 8)
return
(template instance) images_wired_isobmff.fail!(images_wired_isobmff.Box)
fail
!
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong pos
pos
, "largesize");
(local variable) ulong size
size
=
ulong images_wired_isobmff.readBe(in ubyte[] bytes, ulong at, ulong width) pure nothrow @nogc @safe
readBe
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong pos
pos
, 8);
(local variable) ulong pos
pos
+= 8;
(local variable) images_wired_isobmff.Box box
box
.
(field) bool images_wired_isobmff.Box.large

size was 1 and largesize followed

large
= true;
} if (
(local variable) images_wired_isobmff.Box box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
== "uuid")
{ if (
(parameter) ulong parentEnd
parentEnd
-
(local variable) ulong pos
pos
< 16)
return
(template instance) images_wired_isobmff.fail!(images_wired_isobmff.Box)
fail
!
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong pos
pos
, "usertype");
(local variable) images_wired_isobmff.Box box
box
.
(field) ubyte[16] images_wired_isobmff.Box.usertype

for uuid

usertype
=
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) ulong pos
pos
..
(local variable) ulong pos
pos
+ 16];
(local variable) ulong pos
pos
+= 16;
}
(local variable) images_wired_isobmff.Box box
box
.
(field) ulong images_wired_isobmff.Box.headerSize
headerSize
=
(local variable) ulong pos
pos
-
(parameter) ulong at
at
;
if (
(local variable) ulong size
size
== 0)
{ if (!
(parameter) bool topLevel
topLevel
)
return
(template instance) images_wired_isobmff.fail!(images_wired_isobmff.Box)
fail
!
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badSize = 4
badSize
,
(parameter) ulong at
at
, "size 0 below the top level");
(local variable) images_wired_isobmff.Box box
box
.
(field) bool images_wired_isobmff.Box.toEnd

size was 0

toEnd
= true;
(local variable) images_wired_isobmff.Box box
box
.
(field) ulong images_wired_isobmff.Box.end
end
=
(parameter) ulong parentEnd
parentEnd
;
return
sparkles.base.expected.Expected!(Box, BinError, Abort) sparkles.base.expected.ok!(images_wired_isobmff.BinError, sparkles.base.expected.Abort, images_wired_isobmff.Box)(ref images_wired_isobmff.Box value) pure nothrow @nogc @safe

Creates an Expected object from an expected value, with type inference.

ok
!
(struct) images_wired_isobmff.BinError
BinError
(
(local variable) images_wired_isobmff.Box box
box
);
} if (
(local variable) ulong size
size
<
(local variable) images_wired_isobmff.Box box
box
.
(field) ulong images_wired_isobmff.Box.headerSize
headerSize
)
return
(template instance) images_wired_isobmff.fail!(images_wired_isobmff.Box)
fail
!
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badSize = 4
badSize
,
(parameter) ulong at
at
,
string std.format.format!("size %s smaller than its header", ulong)(ulong __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"size %s smaller than its header"(
(local variable) ulong size
size
));
if (
(local variable) ulong size
size
>
(parameter) ulong parentEnd
parentEnd
-
(parameter) ulong at
at
)
return
(template instance) images_wired_isobmff.fail!(images_wired_isobmff.Box)
fail
!
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(parameter) ulong at
at
,
string std.format.format!("%s overruns its parent", char[4])(char[4] __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"%s overruns its parent"(
(local variable) images_wired_isobmff.Box box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
));
(local variable) images_wired_isobmff.Box box
box
.
(field) ulong images_wired_isobmff.Box.end
end
=
(parameter) ulong at
at
+ cast(
(alias) object.size_t = ulong
size_t
)
(local variable) ulong size
size
;
return
sparkles.base.expected.Expected!(Box, BinError, Abort) sparkles.base.expected.ok!(images_wired_isobmff.BinError, sparkles.base.expected.Abort, images_wired_isobmff.Box)(ref images_wired_isobmff.Box value) pure nothrow @nogc @safe

Creates an Expected object from an expected value, with type inference.

ok
!
(struct) images_wired_isobmff.BinError
BinError
(
(local variable) images_wired_isobmff.Box box
box
);
} /// GAP: a FullBox's version and flags, with the versions a box accepts.
(alias) images_wired_isobmff.BinResult!(images_wired_isobmff.FullBoxHeader) = sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort)
BinResult
!
(struct) images_wired_isobmff.FullBoxHeader

§4.2.2 FullBox: "unsigned int(8) version; bit(24) flags;" There is no 24-bit leaf, so the flags are three bytes.

FullBoxHeader
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
, in
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(parameter) const(images_wired_isobmff.Box) box
box
, ubyte
(parameter) ubyte maxVersion
maxVersion
)
{ auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.decodeFixed!(images_wired_isobmff.FullBoxHeader)(in ubyte[] bytes, ulong at) pure nothrow @safe

Decodes a fixed record at at: one bounds check, the schema walk with field checks, then the type-level @WireChecks.

decodeFixed
!
(struct) images_wired_isobmff.FullBoxHeader

§4.2.2 FullBox: "unsigned int(8) version; bit(24) flags;" There is no 24-bit leaf, so the flags are three bytes.

FullBoxHeader
(
(parameter) const(ubyte[]) bytes
bytes
[0 ..
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
],
(parameter) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
;
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.FullBoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) ubyte images_wired_isobmff.FullBoxHeader.version_
version_
>
(parameter) ubyte maxVersion
maxVersion
)
return
(template instance) images_wired_isobmff.fail!(images_wired_isobmff.FullBoxHeader)
fail
!
(struct) images_wired_isobmff.FullBoxHeader

§4.2.2 FullBox: "unsigned int(8) version; bit(24) flags;" There is no 24-bit leaf, so the flags are three bytes.

FullBoxHeader
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badVersion = 5
badVersion
,
(parameter) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
,
string std.format.format!("%s version %s", const(char[4]), ubyte)(const(char[4]) __param_0, ubyte __param_1) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"%s version %s"(
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
,
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.FullBoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) ubyte images_wired_isobmff.FullBoxHeader.version_
version_
));
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
;
} uint
uint images_wired_isobmff.flagsOf(in images_wired_isobmff.FullBoxHeader f) pure nothrow @nogc @safe
flagsOf
(in
(struct) images_wired_isobmff.FullBoxHeader

§4.2.2 FullBox: "unsigned int(8) version; bit(24) flags;" There is no 24-bit leaf, so the flags are three bytes.

FullBoxHeader
(parameter) const(images_wired_isobmff.FullBoxHeader) f
f
) @safe pure nothrow @nogc
=>
(parameter) const(images_wired_isobmff.FullBoxHeader) f
f
.
(field) ubyte[3] images_wired_isobmff.FullBoxHeader.flags
flags
[0] << 16 |
(parameter) const(images_wired_isobmff.FullBoxHeader) f
f
.
(field) ubyte[3] images_wired_isobmff.FullBoxHeader.flags
flags
[1] << 8 |
(parameter) const(images_wired_isobmff.FullBoxHeader) f
f
.
(field) ubyte[3] images_wired_isobmff.FullBoxHeader.flags
flags
[2];
struct
(struct) images_wired_isobmff.Extent
Extent
{ ulong
(field) ulong images_wired_isobmff.Extent.offset
offset
;
ulong
(field) ulong images_wired_isobmff.Extent.length
length
;
} struct
(struct) images_wired_isobmff.Item
Item
{ uint
(field) uint images_wired_isobmff.Item.id
id
;
char[4]
(field) char[4] images_wired_isobmff.Item.type
type
;
(alias) object.string = string
string
(field) string images_wired_isobmff.Item.name
name
;
(struct) images_wired_isobmff.Extent
Extent
[]
(field) images_wired_isobmff.Extent[] images_wired_isobmff.Item.extents
extents
;
uint[]
(field) uint[] images_wired_isobmff.Item.properties

1-based indices into ipco

properties
; /// 1-based indices into ipco
bool[]
(field) bool[] images_wired_isobmff.Item.essential
essential
;
} struct
(struct) images_wired_isobmff.Property
Property
{ char[4]
(field) char[4] images_wired_isobmff.Property.type
type
;
(alias) object.size_t = ulong
size_t
(field) ulong images_wired_isobmff.Property.at
at
;
(struct) images_wired_isobmff.ImageSpatialExtents

ISO/IEC 23008-12 ispe, after FullBox.

ImageSpatialExtents
(field) images_wired_isobmff.ImageSpatialExtents images_wired_isobmff.Property.ispe
ispe
;
ubyte[]
(field) ubyte[] images_wired_isobmff.Property.bitsPerChannel

pixi

bitsPerChannel
; /// pixi
} struct
(struct) images_wired_isobmff.Heif
Heif
{
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
[]
(field) images_wired_isobmff.Box[] images_wired_isobmff.Heif.tree

every box visited, depth-first

tree
; /// every box visited, depth-first
(alias) object.size_t = ulong
size_t
[]
(field) ulong[] images_wired_isobmff.Heif.depth
depth
;
char[4]
(field) char[4] images_wired_isobmff.Heif.majorBrand
majorBrand
;
char[4][]
(field) char[4][] images_wired_isobmff.Heif.brands
brands
;
char[4]
(field) char[4] images_wired_isobmff.Heif.handler
handler
;
uint
(field) uint images_wired_isobmff.Heif.primary
primary
;
(struct) images_wired_isobmff.Item
Item
[]
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
;
(struct) images_wired_isobmff.Property
Property
[]
(field) images_wired_isobmff.Property[] images_wired_isobmff.Heif.properties
properties
;
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(field) images_wired_isobmff.Box images_wired_isobmff.Heif.mdat
mdat
;
ubyte
(field) ubyte images_wired_isobmff.Heif.ilocVersion
ilocVersion
;
ubyte[4]
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
; /// offset, length, base_offset, index
(alias) object.size_t = ulong
size_t
(field) ulong images_wired_isobmff.Heif.pitmAt
pitmAt
,
(field) ulong images_wired_isobmff.Heif.ilocAt
ilocAt
,
(field) ulong images_wired_isobmff.Heif.ipmaAt

where each reference table starts

ipmaAt
; /// where each reference table starts
} /// GAP: an unsigned integer whose width (0, 4 or 8 bytes) came from data. bool
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
, ref
(alias) object.size_t = ulong
size_t
(parameter) ulong pos
pos
,
(alias) object.size_t = ulong
size_t
(parameter) ulong end
end
, ubyte
(parameter) ubyte width
width
, out ulong
(parameter) ulong value
value
)
{ if (
(parameter) ulong end
end
-
(parameter) ulong pos
pos
<
(parameter) ubyte width
width
)
return false;
(parameter) ulong value
value
=
ulong images_wired_isobmff.readBe(in ubyte[] bytes, ulong at, ulong width) pure nothrow @nogc @safe
readBe
(
(parameter) const(ubyte[]) bytes
bytes
,
(parameter) ulong pos
pos
,
(parameter) ubyte width
width
);
(parameter) ulong pos
pos
+=
(parameter) ubyte width
width
;
return true; } /// GAP: the walk, nesting, versions, varying widths and the item tables.
(alias) images_wired_isobmff.BinResult!(images_wired_isobmff.Heif) = sparkles.base.expected.Expected!(Heif, BinError, Abort)
BinResult
!
(struct) images_wired_isobmff.Heif
Heif
sparkles.base.expected.Expected!(Heif, BinError, Abort) images_wired_isobmff.parseHeif(in ubyte[] bytes)

GAP

the walk, nesting, versions, varying widths and the item tables.

parseHeif
(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
)
{
(struct) images_wired_isobmff.Heif
Heif
(local variable) images_wired_isobmff.Heif heif
heif
;
(struct) images_wired_isobmff.BinError
BinError
images_wired_isobmff.BinError images_wired_isobmff.parseHeif.walk(ulong from, ulong end, ulong level) @system
walk
(
(alias) object.size_t = ulong
size_t
(parameter) ulong from
from
,
(alias) object.size_t = ulong
size_t
(parameter) ulong end
end
,
(alias) object.size_t = ulong
size_t
(parameter) ulong level
level
)
{
(alias) object.size_t = ulong
size_t
(local variable) ulong pos
pos
=
(parameter) ulong from
from
;
while (
(local variable) ulong pos
pos
<
(parameter) ulong end
end
)
{ auto
(local variable) sparkles.base.expected.Expected!(Box, BinError, Abort) b
b
=
sparkles.base.expected.Expected!(Box, BinError, Abort) images_wired_isobmff.readBox(in ubyte[] bytes, ulong at, ulong parentEnd, bool topLevel)

GAP

§4.2.2's header: size, type, then largesize if size == 1, then the 16-byte usertype if type is uuid. Size 0 extends to the end of the file and is legal only at the top level (libavif avifROStreamReadBoxHeaderPartial).

readBox
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong pos
pos
,
(parameter) ulong end
end
,
(parameter) ulong level
level
== 0);
if (
(local variable) sparkles.base.expected.Expected!(Box, BinError, Abort) b
b
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.Box, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(Box, BinError, Abort) b
b
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.Box, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
const
(local variable) const(images_wired_isobmff.Box) box
box
=
(local variable) sparkles.base.expected.Expected!(Box, BinError, Abort) b
b
.
inout(images_wired_isobmff.Box) sparkles.base.expected.Expected!(images_wired_isobmff.Box, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
;
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Box[] images_wired_isobmff.Heif.tree

every box visited, depth-first

tree
~=
(local variable) const(images_wired_isobmff.Box) box
box
;
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) ulong[] images_wired_isobmff.Heif.depth
depth
~=
(parameter) ulong level
level
;
(struct) images_wired_isobmff.BinError
BinError
(local variable) images_wired_isobmff.BinError e
e
;
switch (
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
[])
{ case "ftyp": auto
(local variable) sparkles.base.expected.Expected!(FileTypeFixed, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FileTypeFixed, BinError, Abort) images_wired_isobmff.decodeFixed!(images_wired_isobmff.FileTypeFixed)(in ubyte[] bytes, ulong at) pure nothrow @safe

Decodes a fixed record at at: one bounds check, the schema walk with field checks, then the type-level @WireChecks.

decodeFixed
!
(struct) images_wired_isobmff.FileTypeFixed

§4.3 ftyp, before its compatible brands (which run to the box end).

FileTypeFixed
(
(parameter) const(ubyte[]) bytes
bytes
[0 ..
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
],
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
);
if (
(local variable) sparkles.base.expected.Expected!(FileTypeFixed, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FileTypeFixed, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FileTypeFixed, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FileTypeFixed, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) char[4] images_wired_isobmff.Heif.majorBrand
majorBrand
=
(local variable) sparkles.base.expected.Expected!(FileTypeFixed, BinError, Abort) f
f
.
inout(images_wired_isobmff.FileTypeFixed) sparkles.base.expected.Expected!(images_wired_isobmff.FileTypeFixed, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) char[4] images_wired_isobmff.FileTypeFixed.majorBrand
majorBrand
;
for (
(alias) object.size_t = ulong
size_t
(local variable) ulong p
p
=
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 8; p + 4 <= box.end; p += 4)
{ char[4]
(local variable) char[4] brand
brand
= cast(const(char)[])
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) ulong p
p
..
(local variable) ulong p
p
+ 4];
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) char[4][] images_wired_isobmff.Heif.brands
brands
~=
(local variable) char[4] brand
brand
;
} break; case "meta": auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) const(images_wired_isobmff.Box) box
box
, 0);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
(local variable) images_wired_isobmff.BinError e
e
=
images_wired_isobmff.BinError images_wired_isobmff.parseHeif.walk(ulong from, ulong end, ulong level) @system
walk
(
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(parameter) ulong level
level
+ 1);
break; case "iprp", "ipco":
(local variable) images_wired_isobmff.BinError e
e
=
images_wired_isobmff.BinError images_wired_isobmff.parseHeif.walk(ulong from, ulong end, ulong level) @system
walk
(
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(parameter) ulong level
level
+ 1);
break; case "hdlr": auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) const(images_wired_isobmff.Box) box
box
, 0);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
auto
(local variable) sparkles.base.expected.Expected!(HandlerFixed, BinError, Abort) h
h
=
sparkles.base.expected.Expected!(HandlerFixed, BinError, Abort) images_wired_isobmff.decodeFixed!(images_wired_isobmff.HandlerFixed)(in ubyte[] bytes, ulong at) pure nothrow @safe

Decodes a fixed record at at: one bounds check, the schema walk with field checks, then the type-level @WireChecks.

decodeFixed
!
(struct) images_wired_isobmff.HandlerFixed

§8.4.3 hdlr, after FullBox and before the NUL-terminated name.

HandlerFixed
(
(parameter) const(ubyte[]) bytes
bytes
[0 ..
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
],
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4);
if (
(local variable) sparkles.base.expected.Expected!(HandlerFixed, BinError, Abort) h
h
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.HandlerFixed, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(HandlerFixed, BinError, Abort) h
h
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.HandlerFixed, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) char[4] images_wired_isobmff.Heif.handler
handler
=
(local variable) sparkles.base.expected.Expected!(HandlerFixed, BinError, Abort) h
h
.
inout(images_wired_isobmff.HandlerFixed) sparkles.base.expected.Expected!(images_wired_isobmff.HandlerFixed, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) char[4] images_wired_isobmff.HandlerFixed.handlerType
handlerType
;
break; case "pitm": auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) const(images_wired_isobmff.Box) box
box
, 1);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
// GAP: item_ID is 16 bits in version 0 and 32 in version 1.
(alias) object.size_t = ulong
size_t
(local variable) ulong p
p
=
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4;
ulong
(local variable) ulong id
id
;
if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.FullBoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) ubyte images_wired_isobmff.FullBoxHeader.version_
version_
== 0 ? 2 : 4,
(local variable) ulong id
id
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "pitm.item_ID");
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) uint images_wired_isobmff.Heif.primary
primary
= cast(uint)
(local variable) ulong id
id
;
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) ulong images_wired_isobmff.Heif.pitmAt
pitmAt
=
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
;
break; case "iinf": auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) const(images_wired_isobmff.Box) box
box
, 1);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
(alias) object.size_t = ulong
size_t
(local variable) ulong p
p
=
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4;
ulong
(local variable) ulong count
count
;
if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.FullBoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) ubyte images_wired_isobmff.FullBoxHeader.version_
version_
== 0 ? 2 : 4,
(local variable) ulong count
count
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "iinf.entry_count");
const
(local variable) const(ulong) before
before
=
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
.
(field) ulong images_wired_isobmff.Item[].length
length
;
(local variable) images_wired_isobmff.BinError e
e
=
images_wired_isobmff.BinError images_wired_isobmff.parseHeif.walk(ulong from, ulong end, ulong level) @system
walk
(
(local variable) ulong p
p
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(parameter) ulong level
level
+ 1);
if (
(local variable) images_wired_isobmff.BinError e
e
.
(field) images_wired_isobmff.BinErrorKind images_wired_isobmff.BinError.kind
kind
==
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.none = cast(ubyte)0u
none
&&
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
.
(field) ulong images_wired_isobmff.Item[].length
length
-
(local variable) const(ulong) before
before
!=
(local variable) ulong count
count
)
(local variable) images_wired_isobmff.BinError e
e
=
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.checkFailed = 3
checkFailed
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
, "iinf entry_count differs from its infe boxes");
break; case "infe": auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) const(images_wired_isobmff.Box) box
box
, 3);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.FullBoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) ubyte images_wired_isobmff.FullBoxHeader.version_
version_
!= 2)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badVersion = 5
badVersion
,
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
, "infe version other than 2 not described");
auto
(local variable) sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) v
v
=
sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) images_wired_isobmff.decodeFixed!(images_wired_isobmff.ItemInfoEntryV2)(in ubyte[] bytes, ulong at) pure nothrow @safe

Decodes a fixed record at at: one bounds check, the schema walk with field checks, then the type-level @WireChecks.

decodeFixed
!
(struct) images_wired_isobmff.ItemInfoEntryV2

§8.11.6 infe version 2, after FullBox and before the name.

ItemInfoEntryV2
(
(parameter) const(ubyte[]) bytes
bytes
[0 ..
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
],
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4);
if (
(local variable) sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) v
v
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.ItemInfoEntryV2, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) v
v
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.ItemInfoEntryV2, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
(struct) images_wired_isobmff.Item
Item
(local variable) images_wired_isobmff.Item item
item
=
(struct) images_wired_isobmff.Item
Item
(
(local variable) sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) v
v
.
inout(images_wired_isobmff.ItemInfoEntryV2) sparkles.base.expected.Expected!(images_wired_isobmff.ItemInfoEntryV2, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) ushort images_wired_isobmff.ItemInfoEntryV2.itemId
itemId
,
(local variable) sparkles.base.expected.Expected!(ItemInfoEntryV2, BinError, Abort) v
v
.
inout(images_wired_isobmff.ItemInfoEntryV2) sparkles.base.expected.Expected!(images_wired_isobmff.ItemInfoEntryV2, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) char[4] images_wired_isobmff.ItemInfoEntryV2.itemType
itemType
);
foreach (
(parameter) images_wired_isobmff.Item other
other
;
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
)
if (
(local variable) images_wired_isobmff.Item other
other
.
(field) uint images_wired_isobmff.Item.id
id
==
(local variable) images_wired_isobmff.Item item
item
.
(field) uint images_wired_isobmff.Item.id
id
)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.duplicate = 7
duplicate
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
, "infe item_ID repeated");
// GAP: a NUL-terminated name inside the box.
(alias) object.size_t = ulong
size_t
(local variable) ulong p
p
=
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 12;
const
(local variable) const(ulong) nameStart
nameStart
=
(local variable) ulong p
p
;
while (
(local variable) ulong p
p
<
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
&&
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) ulong p
p
] != 0)
(local variable) ulong p
p
++;
if (
(local variable) ulong p
p
==
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) const(ulong) nameStart
nameStart
, "infe.item_name has no NUL");
(local variable) images_wired_isobmff.Item item
item
.
(field) string images_wired_isobmff.Item.name
name
= cast(
(alias) object.string = string
string
)
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) const(ulong) nameStart
nameStart
..
(local variable) ulong p
p
].
immutable(ubyte)[] object.idup!(const(ubyte))(const(ubyte)[] a) pure nothrow @property @safe

Provide the .idup array property, which creates an immutable duplicate.

idup
;
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
~=
(local variable) images_wired_isobmff.Item item
item
;
break; case "iloc":
(local variable) images_wired_isobmff.BinError e
e
=
images_wired_isobmff.BinError images_wired_isobmff.parseIloc(in ubyte[] bytes, in images_wired_isobmff.Box box, ref images_wired_isobmff.Heif heif)

GAP

§8.11.3 iloc. Four 4-bit fields set the widths of fields that follow; version 1 adds construction_method, version 2 widens the item count and IDs to 32 bits.

parseIloc
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) const(images_wired_isobmff.Box) box
box
,
(local variable) images_wired_isobmff.Heif heif
heif
);
break; case "ispe", "pixi": auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) const(images_wired_isobmff.Box) box
box
, 0);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
(struct) images_wired_isobmff.Property
Property
(local variable) images_wired_isobmff.Property prop
prop
=
(struct) images_wired_isobmff.Property
Property
(
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
);
if (
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
== "ispe")
{ auto
(local variable) sparkles.base.expected.Expected!(ImageSpatialExtents, BinError, Abort) v
v
=
sparkles.base.expected.Expected!(ImageSpatialExtents, BinError, Abort) images_wired_isobmff.decodeFixed!(images_wired_isobmff.ImageSpatialExtents)(in ubyte[] bytes, ulong at) pure nothrow @safe

Decodes a fixed record at at: one bounds check, the schema walk with field checks, then the type-level @WireChecks.

decodeFixed
!
(struct) images_wired_isobmff.ImageSpatialExtents

ISO/IEC 23008-12 ispe, after FullBox.

ImageSpatialExtents
(
(parameter) const(ubyte[]) bytes
bytes
[0 ..
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
],
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4);
if (
(local variable) sparkles.base.expected.Expected!(ImageSpatialExtents, BinError, Abort) v
v
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.ImageSpatialExtents, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(ImageSpatialExtents, BinError, Abort) v
v
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.ImageSpatialExtents, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
(local variable) images_wired_isobmff.Property prop
prop
.
(field) images_wired_isobmff.ImageSpatialExtents images_wired_isobmff.Property.ispe
ispe
=
(local variable) sparkles.base.expected.Expected!(ImageSpatialExtents, BinError, Abort) v
v
.
inout(images_wired_isobmff.ImageSpatialExtents) sparkles.base.expected.Expected!(images_wired_isobmff.ImageSpatialExtents, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
;
} else { // GAP: a count byte, then that many bytes. const
(local variable) const(ulong) p
p
=
(local variable) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4;
if (
(local variable) const(ulong) p
p
>=
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
||
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
-
(local variable) const(ulong) p
p
- 1 <
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) const(ulong) p
p
])
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) const(ulong) p
p
, "pixi.bits_per_channel");
(local variable) images_wired_isobmff.Property prop
prop
.
(field) ubyte[] images_wired_isobmff.Property.bitsPerChannel

pixi

bitsPerChannel
=
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) const(ulong) p
p
+ 1 ..
(local variable) const(ulong) p
p
+ 1 +
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) const(ulong) p
p
]].
ubyte[] object.dup!ubyte(const(ubyte)[] a) pure nothrow @property @safe
dup
;
}
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Property[] images_wired_isobmff.Heif.properties
properties
~=
(local variable) images_wired_isobmff.Property prop
prop
;
break; case "ipma":
(local variable) images_wired_isobmff.BinError e
e
=
images_wired_isobmff.BinError images_wired_isobmff.parseIpma(in ubyte[] bytes, in images_wired_isobmff.Box box, ref images_wired_isobmff.Heif heif)

GAP

ISO/IEC 23008-12 ipma. Item IDs are 16 bits in version 0, 32 in version 1; with flags bit 0 an association is 16 bits (1 essential bit, 15-bit index), else 8 bits (1 + 7).

parseIpma
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) const(images_wired_isobmff.Box) box
box
,
(local variable) images_wired_isobmff.Heif heif
heif
);
break; case "mdat":
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Box images_wired_isobmff.Heif.mdat
mdat
=
(local variable) const(images_wired_isobmff.Box) box
box
;
break; default: if (
(parameter) ulong level
level
!= 0)
(local variable) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Property[] images_wired_isobmff.Heif.properties
properties
~=
(struct) images_wired_isobmff.Property
Property
(
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
); // ipco keeps unknown properties
break; // unknown boxes are skipped by their size } if (
(local variable) images_wired_isobmff.BinError e
e
.
(field) images_wired_isobmff.BinErrorKind images_wired_isobmff.BinError.kind
kind
!=
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.none = cast(ubyte)0u
none
)
return
(local variable) images_wired_isobmff.BinError e
e
;
(local variable) ulong pos
pos
=
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
;
} return
(struct) images_wired_isobmff.BinError
BinError
.
(constant) images_wired_isobmff.BinError images_wired_isobmff.BinError.init = BinError(BinErrorKind.none, 0LU, null)
init
;
} auto
(local variable) images_wired_isobmff.BinError e
e
=
images_wired_isobmff.BinError images_wired_isobmff.parseHeif.walk(ulong from, ulong end, ulong level) @system
walk
(0,
(parameter) const(ubyte[]) bytes
bytes
.
(field) ulong const(ubyte[]).length
length
, 0);
if (
(local variable) images_wired_isobmff.BinError e
e
.
(field) images_wired_isobmff.BinErrorKind images_wired_isobmff.BinError.kind
kind
!=
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.none = cast(ubyte)0u
none
)
return
sparkles.base.expected.Expected!(Heif, BinError, Abort) sparkles.base.expected.err!(images_wired_isobmff.Heif, sparkles.base.expected.Abort, images_wired_isobmff.BinError)(ref images_wired_isobmff.BinError err) pure nothrow @nogc @safe

Creates an Expected object from an error value, with type inference.

Examples

// implicit void value type
{
    auto res = err("foo");
    static assert(is(typeof(res) == Expected!(void, string)));
    assert(!res);
    assert(res.error == "foo");
}

// bool
{
    auto res = err!int("42");
    static assert(is(typeof(res) == Expected!(int, string)));
    assert(!res);
    assert(res.error == "42");
}

// other error type
{
    auto res = err!bool(42);
    static assert(is(typeof(res) == Expected!(bool, int)));
    assert(!res);
    assert(res.error == 42);
}
err
!
(struct) images_wired_isobmff.Heif
Heif
(
(local variable) images_wired_isobmff.BinError e
e
);
return
sparkles.base.expected.Expected!(Heif, BinError, Abort) images_wired_isobmff.resolve(in ubyte[] bytes, ref images_wired_isobmff.Heif heif)

GAP

the references by ID and index, checked after the whole tree is read.

resolve
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) images_wired_isobmff.Heif heif
heif
);
} /// GAP: §8.11.3 `iloc`. Four 4-bit fields set the widths of fields that /// follow; version 1 adds `construction_method`, version 2 widens the item /// count and IDs to 32 bits.
(struct) images_wired_isobmff.BinError
BinError
images_wired_isobmff.BinError images_wired_isobmff.parseIloc(in ubyte[] bytes, in images_wired_isobmff.Box box, ref images_wired_isobmff.Heif heif)

GAP

§8.11.3 iloc. Four 4-bit fields set the widths of fields that follow; version 1 adds construction_method, version 2 widens the item count and IDs to 32 bits.

parseIloc
(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
, in
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(parameter) const(images_wired_isobmff.Box) box
box
, ref
(struct) images_wired_isobmff.Heif
Heif
(parameter) images_wired_isobmff.Heif heif
heif
)
{ auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(
(parameter) const(ubyte[]) bytes
bytes
,
(parameter) const(images_wired_isobmff.Box) box
box
, 2);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
const
(local variable) const(ubyte) v
v
=
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.FullBoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) ubyte images_wired_isobmff.FullBoxHeader.version_
version_
;
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ubyte images_wired_isobmff.Heif.ilocVersion
ilocVersion
=
(local variable) const(ubyte) v
v
;
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ulong images_wired_isobmff.Heif.ilocAt
ilocAt
=
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
;
(alias) object.size_t = ulong
size_t
(local variable) ulong p
p
=
(parameter) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4;
if (
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
-
(local variable) ulong p
p
< 2)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "iloc sizes");
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
= [
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) ulong p
p
] >> 4,
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) ulong p
p
] & 0xF,
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) ulong p
p
+ 1] >> 4,
(local variable) const(ubyte) v
v
?
(parameter) const(ubyte[]) bytes
bytes
[
(local variable) ulong p
p
+ 1] & 0xF : 0];
(local variable) ulong p
p
+= 2;
foreach (
(parameter) ubyte size
size
;
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
)
if (
(local variable) ubyte size
size
!= 0 &&
(local variable) ubyte size
size
!= 4 &&
(local variable) ubyte size
size
!= 8)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.checkFailed = 3
checkFailed
,
(parameter) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4,
string std.format.format!("iloc field size %s", ubyte)(ubyte __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"iloc field size %s"(
(local variable) ubyte size
size
));
const ubyte
(local variable) const(ubyte) offsetSize
offsetSize
=
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
[0],
(local variable) const(ubyte) lengthSize
lengthSize
=
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
[1],
(local variable) const(ubyte) baseSize
baseSize
=
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
[2],
(local variable) const(ubyte) indexSize
indexSize
=
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
[3];
ulong
(local variable) ulong count
count
;
if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) const(ubyte) v
v
< 2 ? 2 : 4,
(local variable) ulong count
count
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "iloc.item_count");
foreach (
(local variable) ulong _
_
; 0 ..
(local variable) ulong count
count
)
{ ulong
(local variable) ulong id
id
,
(local variable) ulong method
method
,
(local variable) ulong dref
dref
,
(local variable) ulong base
base
,
(local variable) ulong extentCount
extentCount
;
if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) const(ubyte) v
v
< 2 ? 2 : 4,
(local variable) ulong id
id
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "iloc.item_ID");
if (
(local variable) const(ubyte) v
v
>= 1)
{ if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
, 2,
(local variable) ulong method
method
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "iloc.construction_method");
if ((
(local variable) ulong method
method
& 0xFFF0) != 0 || (
(local variable) ulong method
method
& 0xF) != 0)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.checkFailed = 3
checkFailed
,
(local variable) ulong p
p
- 2, "only construction_method 0 is described");
} if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
, 2,
(local variable) ulong dref
dref
) || !
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) const(ubyte) baseSize
baseSize
,
(local variable) ulong base
base
)
|| !
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
, 2,
(local variable) ulong extentCount
extentCount
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "iloc item");
(struct) images_wired_isobmff.Item
Item
*
(local variable) images_wired_isobmff.Item* item
item
;
foreach (ref
(parameter) images_wired_isobmff.Item candidate
candidate
;
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
)
if (
(local variable) images_wired_isobmff.Item candidate
candidate
.
(field) uint images_wired_isobmff.Item.id
id
==
(local variable) ulong id
id
)
(local variable) images_wired_isobmff.Item* item
item
= &
(local variable) images_wired_isobmff.Item candidate
candidate
;
if (
(local variable) images_wired_isobmff.Item* item
item
is null)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badReference = 6
badReference
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
,
string std.format.format!("iloc names item %s, absent from iinf", ulong)(ulong __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"iloc names item %s, absent from iinf"(
(local variable) ulong id
id
));
if (
(local variable) images_wired_isobmff.Item* item
item
.
(field) images_wired_isobmff.Extent[] images_wired_isobmff.Item.extents
extents
.
(field) ulong images_wired_isobmff.Extent[].length
length
)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.duplicate = 7
duplicate
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
,
string std.format.format!("item %s located twice", ulong)(ulong __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"item %s located twice"(
(local variable) ulong id
id
));
foreach (
(parameter) ulong __
__
; 0 ..
(local variable) ulong extentCount
extentCount
)
{ ulong
(local variable) ulong index
index
,
(local variable) ulong offset
offset
,
(local variable) ulong length
length
;
if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) const(ubyte) indexSize
indexSize
,
(local variable) ulong index
index
) || !
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) const(ubyte) offsetSize
offsetSize
,
(local variable) ulong offset
offset
)
|| !
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) const(ubyte) lengthSize
lengthSize
,
(local variable) ulong length
length
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "iloc extent");
if (
(local variable) ulong offset
offset
> ulong.
(constant) ulong ulong.max = 18446744073709551615LU
max
-
(local variable) ulong base
base
)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badSize = 4
badSize
,
(local variable) ulong p
p
, "iloc offset overflows");
(local variable) images_wired_isobmff.Item* item
item
.
(field) images_wired_isobmff.Extent[] images_wired_isobmff.Item.extents
extents
~=
(struct) images_wired_isobmff.Extent
Extent
(
(local variable) ulong base
base
+
(local variable) ulong offset
offset
,
(local variable) ulong length
length
);
} } return
(struct) images_wired_isobmff.BinError
BinError
.
(constant) images_wired_isobmff.BinError images_wired_isobmff.BinError.init = BinError(BinErrorKind.none, 0LU, null)
init
;
} /// GAP: ISO/IEC 23008-12 `ipma`. Item IDs are 16 bits in version 0, 32 in /// version 1; with flags bit 0 an association is 16 bits (1 essential bit, /// 15-bit index), else 8 bits (1 + 7).
(struct) images_wired_isobmff.BinError
BinError
images_wired_isobmff.BinError images_wired_isobmff.parseIpma(in ubyte[] bytes, in images_wired_isobmff.Box box, ref images_wired_isobmff.Heif heif)

GAP

ISO/IEC 23008-12 ipma. Item IDs are 16 bits in version 0, 32 in version 1; with flags bit 0 an association is 16 bits (1 essential bit, 15-bit index), else 8 bits (1 + 7).

parseIpma
(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
, in
(struct) images_wired_isobmff.Box

A box located in the input: [start, end) with the payload after headerSize bytes.

Box
(parameter) const(images_wired_isobmff.Box) box
box
, ref
(struct) images_wired_isobmff.Heif
Heif
(parameter) images_wired_isobmff.Heif heif
heif
)
{ auto
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
=
sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) images_wired_isobmff.readFull(in ubyte[] bytes, in images_wired_isobmff.Box box, ubyte maxVersion)

GAP

a FullBox's version and flags, with the versions a box accepts.

readFull
(
(parameter) const(ubyte[]) bytes
bytes
,
(parameter) const(images_wired_isobmff.Box) box
box
, 1);
if (
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
return
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
;
const
(local variable) const(bool) wide
wide
= (
uint images_wired_isobmff.flagsOf(in images_wired_isobmff.FullBoxHeader f) pure nothrow @nogc @safe
flagsOf
(
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.FullBoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
) & 1) != 0;
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ulong images_wired_isobmff.Heif.ipmaAt

where each reference table starts

ipmaAt
=
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
;
(alias) object.size_t = ulong
size_t
(local variable) ulong p
p
=
(parameter) const(images_wired_isobmff.Box) box
box
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
+ 4;
ulong
(local variable) ulong count
count
;
if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
, 4,
(local variable) ulong count
count
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "ipma.entry_count");
foreach (
(local variable) ulong _
_
; 0 ..
(local variable) ulong count
count
)
{ ulong
(local variable) ulong id
id
,
(local variable) ulong associations
associations
;
if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) sparkles.base.expected.Expected!(FullBoxHeader, BinError, Abort) f
f
.
inout(images_wired_isobmff.FullBoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.FullBoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
.
(field) ubyte images_wired_isobmff.FullBoxHeader.version_
version_
== 0 ? 2 : 4,
(local variable) ulong id
id
) || !
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
, 1,
(local variable) ulong associations
associations
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "ipma entry");
(struct) images_wired_isobmff.Item
Item
*
(local variable) images_wired_isobmff.Item* item
item
;
foreach (ref
(parameter) images_wired_isobmff.Item candidate
candidate
;
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
)
if (
(local variable) images_wired_isobmff.Item candidate
candidate
.
(field) uint images_wired_isobmff.Item.id
id
==
(local variable) ulong id
id
)
(local variable) images_wired_isobmff.Item* item
item
= &
(local variable) images_wired_isobmff.Item candidate
candidate
;
if (
(local variable) images_wired_isobmff.Item* item
item
is null)
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badReference = 6
badReference
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
,
string std.format.format!("ipma names item %s, absent from iinf", ulong)(ulong __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"ipma names item %s, absent from iinf"(
(local variable) ulong id
id
));
foreach (
(parameter) ulong __
__
; 0 ..
(local variable) ulong associations
associations
)
{ ulong
(local variable) ulong raw
raw
;
if (!
bool images_wired_isobmff.readVar(in ubyte[] bytes, ref ulong pos, ulong end, ubyte width, out ulong value)

GAP

an unsigned integer whose width (0, 4 or 8 bytes) came from data.

readVar
(
(parameter) const(ubyte[]) bytes
bytes
,
(local variable) ulong p
p
,
(parameter) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
,
(local variable) const(bool) wide
wide
? 2 : 1,
(local variable) ulong raw
raw
))
return
(struct) images_wired_isobmff.BinError
BinError
(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.truncated = 1
truncated
,
(local variable) ulong p
p
, "ipma association");
const
(local variable) const(int) essentialBit
essentialBit
=
(local variable) const(bool) wide
wide
? 0x8000 : 0x80;
(local variable) images_wired_isobmff.Item* item
item
.
(field) uint[] images_wired_isobmff.Item.properties

1-based indices into ipco

properties
~= cast(uint)(
(local variable) ulong raw
raw
& (
(local variable) const(int) essentialBit
essentialBit
- 1));
(local variable) images_wired_isobmff.Item* item
item
.
(field) bool[] images_wired_isobmff.Item.essential
essential
~= (
(local variable) ulong raw
raw
&
(local variable) const(int) essentialBit
essentialBit
) != 0;
} } return
(struct) images_wired_isobmff.BinError
BinError
.
(constant) images_wired_isobmff.BinError images_wired_isobmff.BinError.init = BinError(BinErrorKind.none, 0LU, null)
init
;
} /// GAP: the references by ID and index, checked after the whole tree is read.
(alias) images_wired_isobmff.BinResult!(images_wired_isobmff.Heif) = sparkles.base.expected.Expected!(Heif, BinError, Abort)
BinResult
!
(struct) images_wired_isobmff.Heif
Heif
sparkles.base.expected.Expected!(Heif, BinError, Abort) images_wired_isobmff.resolve(in ubyte[] bytes, ref images_wired_isobmff.Heif heif)

GAP

the references by ID and index, checked after the whole tree is read.

resolve
(in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
, ref
(struct) images_wired_isobmff.Heif
Heif
(parameter) images_wired_isobmff.Heif heif
heif
)
{ alias
(alias) images_wired_isobmff.resolve.bad = sparkles.base.expected.Expected!(Heif, BinError, Abort) images_wired_isobmff.fail(T)(images_wired_isobmff.BinErrorKind kind, ulong at, string what) pure nothrow @nogc @safe
bad
=
sparkles.base.expected.Expected!(Heif, BinError, Abort) images_wired_isobmff.fail(T)(images_wired_isobmff.BinErrorKind kind, ulong at, string what) pure nothrow @nogc @safe
fail
!
(struct) images_wired_isobmff.Heif
Heif
;
bool
(local variable) bool found
found
;
foreach (
(parameter) images_wired_isobmff.Item item
item
;
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
)
(local variable) bool found
found
|=
(local variable) images_wired_isobmff.Item item
item
.
(field) uint images_wired_isobmff.Item.id
id
==
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) uint images_wired_isobmff.Heif.primary
primary
;
if (!
(local variable) bool found
found
)
return bad(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badReference = 6
badReference
,
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ulong images_wired_isobmff.Heif.pitmAt
pitmAt
,
string std.format.format!("pitm names item %s, absent from iinf", uint)(uint __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"pitm names item %s, absent from iinf"(
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) uint images_wired_isobmff.Heif.primary
primary
));
foreach (
(parameter) images_wired_isobmff.Item item
item
;
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
)
{ foreach (
(parameter) ulong i
i
,
(parameter) uint index
index
;
(local variable) images_wired_isobmff.Item item
item
.
(field) uint[] images_wired_isobmff.Item.properties

1-based indices into ipco

properties
)
if (
(local variable) uint index
index
== 0 ?
(local variable) images_wired_isobmff.Item item
item
.
(field) bool[] images_wired_isobmff.Item.essential
essential
[
(local variable) ulong i
i
] :
(local variable) uint index
index
>
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Property[] images_wired_isobmff.Heif.properties
properties
.
(field) ulong images_wired_isobmff.Property[].length
length
)
return bad(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badReference = 6
badReference
,
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ulong images_wired_isobmff.Heif.ipmaAt

where each reference table starts

ipmaAt
,
string std.format.format!("item %s names property %s of %s", uint, uint, ulong)(uint __param_0, uint __param_1, ulong __param_2) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"item %s names property %s of %s"(
(local variable) images_wired_isobmff.Item item
item
.
(field) uint images_wired_isobmff.Item.id
id
,
(local variable) uint index
index
,
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) images_wired_isobmff.Property[] images_wired_isobmff.Heif.properties
properties
.
(field) ulong images_wired_isobmff.Property[].length
length
));
foreach (
(parameter) images_wired_isobmff.Extent extent
extent
;
(local variable) images_wired_isobmff.Item item
item
.
(field) images_wired_isobmff.Extent[] images_wired_isobmff.Item.extents
extents
)
if (
(local variable) images_wired_isobmff.Extent extent
extent
.
(field) ulong images_wired_isobmff.Extent.offset
offset
>
(parameter) const(ubyte[]) bytes
bytes
.
(field) ulong const(ubyte[]).length
length
||
(local variable) images_wired_isobmff.Extent extent
extent
.
(field) ulong images_wired_isobmff.Extent.length
length
>
(parameter) const(ubyte[]) bytes
bytes
.
(field) ulong const(ubyte[]).length
length
-
(local variable) images_wired_isobmff.Extent extent
extent
.
(field) ulong images_wired_isobmff.Extent.offset
offset
)
return bad(
(enum) images_wired_isobmff.BinErrorKind
BinErrorKind
.
(enum value) images_wired_isobmff.BinErrorKind.badReference = 6
badReference
,
(parameter) images_wired_isobmff.Heif heif
heif
.
(field) ulong images_wired_isobmff.Heif.ilocAt
ilocAt
,
string std.format.format!("item %s extent outside the file", uint)(uint __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"item %s extent outside the file"(
(local variable) images_wired_isobmff.Item item
item
.
(field) uint images_wired_isobmff.Item.id
id
));
} return
sparkles.base.expected.Expected!(Heif, BinError, Abort) sparkles.base.expected.ok!(images_wired_isobmff.BinError, sparkles.base.expected.Abort, images_wired_isobmff.Heif)(ref images_wired_isobmff.Heif value) pure nothrow @nogc @safe

Creates an Expected object from an expected value, with type inference.

ok
!
(struct) images_wired_isobmff.BinError
BinError
(
(parameter) images_wired_isobmff.Heif heif
heif
);
} // --------------------------------------------------------------------------- // Building an input in memory // --------------------------------------------------------------------------- /// GAP on encode: box sizes and `iloc` offsets are only known after the /// bytes they cover are written, so they are back-patched. struct
(struct) images_wired_isobmff.BoxWriter

GAP on encode: box sizes and iloc offsets are only known after the bytes they cover are written, so they are back-patched.

BoxWriter
{ ubyte[]
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
;
(alias) object.size_t = ulong
size_t
[]
(field) ulong[] images_wired_isobmff.BoxWriter.open
open
;
void
void images_wired_isobmff.BoxWriter.begin(string type, bool large = false)
begin
(
(alias) object.string = string
string
(parameter) string type
type
, bool
(parameter) bool large
large
= false)
{
(field) ulong[] images_wired_isobmff.BoxWriter.open
open
~=
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
.
(field) ulong ubyte[].length
length
;
const
(local variable) const(string) refused
refused
=
string images_wired_isobmff.encodeFixed!(images_wired_isobmff.BoxHeader)(in images_wired_isobmff.BoxHeader value, ref ubyte[] output) pure nothrow @safe

Encodes a fixed record after its checks pass, as expressiveness §6.4 requires of encode. Returns the first failure's reason, or null.

encodeFixed
(
(struct) images_wired_isobmff.BoxHeader

§4.2.2: "unsigned int(32) size; unsigned int(32) type = boxtype;"

BoxHeader
(
(parameter) bool large
large
? 1 : 0,
(parameter) string type
type
[0 .. 4]),
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
);
assert(
(local variable) const(string) refused
refused
is null,
(local variable) const(string) refused
refused
);
if (
(parameter) bool large
large
)
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= new ubyte[8];
} void
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
(
(alias) object.string = string
string
(parameter) string type
type
, ubyte
(parameter) ubyte version_
version_
, uint
(parameter) uint flags
flags
= 0)
{
void images_wired_isobmff.BoxWriter.begin(string type, bool large = false)
begin
(
(parameter) string type
type
);
void images_wired_isobmff.BoxWriter.put!(images_wired_isobmff.FullBoxHeader)(in images_wired_isobmff.FullBoxHeader value) pure nothrow @safe
put
(
(struct) images_wired_isobmff.FullBoxHeader

§4.2.2 FullBox: "unsigned int(8) version; bit(24) flags;" There is no 24-bit leaf, so the flags are three bytes.

FullBoxHeader
(
(parameter) ubyte version_
version_
, [cast(ubyte)(
(parameter) uint flags
flags
>> 16), cast(ubyte)(
(parameter) uint flags
flags
>> 8), cast(ubyte)
(parameter) uint flags
flags
]));
} void
void images_wired_isobmff.BoxWriter.put!(images_wired_isobmff.ItemInfoEntryV2)(in images_wired_isobmff.ItemInfoEntryV2 value) pure nothrow @safe
put
(T)(in
(alias) T = images_wired_isobmff.ItemInfoEntryV2
T
(parameter) const(images_wired_isobmff.ItemInfoEntryV2) value
value
)
{ const
(local variable) const(string) refused
refused
=
string images_wired_isobmff.encodeFixed!(images_wired_isobmff.ItemInfoEntryV2)(in images_wired_isobmff.ItemInfoEntryV2 value, ref ubyte[] output) pure nothrow @safe

Encodes a fixed record after its checks pass, as expressiveness §6.4 requires of encode. Returns the first failure's reason, or null.

encodeFixed
(
(parameter) const(images_wired_isobmff.ItemInfoEntryV2) value
value
,
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
);
assert(
(local variable) const(string) refused
refused
is null,
(local variable) const(string) refused
refused
);
} void
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(ulong
(parameter) ulong value
value
,
(alias) object.size_t = ulong
size_t
(parameter) ulong width
width
)
{ foreach_reverse (
(local variable) ulong k
k
; 0 ..
(parameter) ulong width
width
)
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= cast(ubyte)(
(parameter) ulong value
value
>> (8 *
(local variable) ulong k
k
));
} void
void images_wired_isobmff.BoxWriter.patch(ulong at, ulong value, ulong width)
patch
(
(alias) object.size_t = ulong
size_t
(parameter) ulong at
at
, ulong
(parameter) ulong value
value
,
(alias) object.size_t = ulong
size_t
(parameter) ulong width
width
)
{ foreach (
(local variable) ulong k
k
; 0 ..
(parameter) ulong width
width
)
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
[
(parameter) ulong at
at
+
(local variable) ulong k
k
] = cast(ubyte)(
(parameter) ulong value
value
>> (8 * (
(parameter) ulong width
width
- 1 -
(local variable) ulong k
k
)));
} /// Closes the innermost box; `toEnd` leaves size 0. void
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
(bool
(parameter) bool toEnd
toEnd
= false)
{ const
(local variable) const(ulong) start
start
=
(field) ulong[] images_wired_isobmff.BoxWriter.open
open
[$ - 1];
(field) ulong[] images_wired_isobmff.BoxWriter.open
open
=
(field) ulong[] images_wired_isobmff.BoxWriter.open
open
[0 .. $ - 1];
if (
(parameter) bool toEnd
toEnd
)
return; if (
ulong images_wired_isobmff.readBe(in ubyte[] bytes, ulong at, ulong width) pure nothrow @nogc @safe
readBe
(
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
,
(local variable) const(ulong) start
start
, 4) == 1)
void images_wired_isobmff.BoxWriter.patch(ulong at, ulong value, ulong width)
patch
(
(local variable) const(ulong) start
start
+ 8,
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
.
(field) ulong ubyte[].length
length
-
(local variable) const(ulong) start
start
, 8);
else
void images_wired_isobmff.BoxWriter.patch(ulong at, ulong value, ulong width)
patch
(
(local variable) const(ulong) start
start
,
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
.
(field) ulong ubyte[].length
length
-
(local variable) const(ulong) start
start
, 4);
} } enum
(enum) images_wired_isobmff.Variant
Variant
{
(enum value) images_wired_isobmff.Variant.valid = 0
valid
,
(enum value) images_wired_isobmff.Variant.childOverrun = 1
childOverrun
,
(enum value) images_wired_isobmff.Variant.sizeZeroNested = 2
sizeZeroNested
,
(enum value) images_wired_isobmff.Variant.ilocFieldSize3 = 3
ilocFieldSize3
,
(enum value) images_wired_isobmff.Variant.extentOutside = 4
extentOutside
,
(enum value) images_wired_isobmff.Variant.propertyMissing = 5
propertyMissing
,
(enum value) images_wired_isobmff.Variant.primaryMissing = 6
primaryMissing
,
(enum value) images_wired_isobmff.Variant.sizeBelowHeader = 7
sizeBelowHeader
,
} immutable ubyte[]
(immutable global) immutable(ubyte[]) images_wired_isobmff.av1Payload
av1Payload
= cast(immutable(ubyte)[]) "AV1-OBU-BYTES....";
immutable ubyte[]
(immutable global) immutable(ubyte[]) images_wired_isobmff.exifPayload
exifPayload
= cast(immutable(ubyte)[]) "\0\0\0\0MM\0*";
ubyte[]
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
(parameter) images_wired_isobmff.Variant variant
variant
)
{
(struct) images_wired_isobmff.BoxWriter

GAP on encode: box sizes and iloc offsets are only known after the bytes they cover are written, so they are back-patched.

BoxWriter
(local variable) images_wired_isobmff.BoxWriter w
w
;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.begin(string type, bool large = false)
begin
("ftyp");
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.put!(images_wired_isobmff.FileTypeFixed)(in images_wired_isobmff.FileTypeFixed value) pure nothrow @safe
put
(
(struct) images_wired_isobmff.FileTypeFixed

§4.3 ftyp, before its compatible brands (which run to the box end).

FileTypeFixed
("avif", 0));
foreach (
(parameter) string brand
brand
; ["avif", "mif1", "miaf"])
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= cast(const(ubyte)[])
(local variable) string brand
brand
;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.begin(string type, bool large = false)
begin
("uuid");
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= cast(const(ubyte)[]) "0123456789abcdef"; // the usertype
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= cast(const(ubyte)[]) "note";
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("meta", 0);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("hdlr", 0);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.put!(images_wired_isobmff.HandlerFixed)(in images_wired_isobmff.HandlerFixed value) pure nothrow @safe
put
(
(struct) images_wired_isobmff.HandlerFixed

§8.4.3 hdlr, after FullBox and before the NUL-terminated name.

HandlerFixed
(0, "pict", [0, 0, 0]));
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= 0;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("pitm", 0);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(
(parameter) images_wired_isobmff.Variant variant
variant
==
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.primaryMissing = 6
primaryMissing
? 7 : 1, 2);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("iinf", 0);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(2, 2);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("infe", 2);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.put!(images_wired_isobmff.ItemInfoEntryV2)(in images_wired_isobmff.ItemInfoEntryV2 value) pure nothrow @safe
put
(
(struct) images_wired_isobmff.ItemInfoEntryV2

§8.11.6 infe version 2, after FullBox and before the name.

ItemInfoEntryV2
(1, 0, "av01"));
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= cast(const(ubyte)[]) "Color\0";
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("infe", 2);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.put!(images_wired_isobmff.ItemInfoEntryV2)(in images_wired_isobmff.ItemInfoEntryV2 value) pure nothrow @safe
put
(
(struct) images_wired_isobmff.ItemInfoEntryV2

§8.11.6 infe version 2, after FullBox and before the name.

ItemInfoEntryV2
(2, 0, "Exif"));
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= 0;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("iloc", 1);
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= cast(ubyte)(
(parameter) images_wired_isobmff.Variant variant
variant
==
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.ilocFieldSize3 = 3
ilocFieldSize3
? 0x34 : 0x44); // offset_size 4, length_size 4
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= 0x00; // base_offset_size 0, index_size 0
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(2, 2); // item_count
(alias) object.size_t = ulong
size_t
[2]
(local variable) ulong[2] offsetAt
offsetAt
;
foreach (
(parameter) ulong i
i
,
(parameter) int id
id
; [1, 2])
{
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(
(local variable) int id
id
, 2);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(0, 2); // reserved, construction_method 0
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(0, 2); // data_reference_index
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(1, 2); // extent_count
(local variable) ulong[2] offsetAt
offsetAt
[
(local variable) ulong i
i
] =
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
.
(field) ulong ubyte[].length
length
;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(0, 4); // extent_offset, patched below
const
(local variable) const(ulong) length
length
=
(local variable) ulong i
i
== 0 ?
(immutable global) immutable(ubyte[]) images_wired_isobmff.av1Payload
av1Payload
.
(field) ulong immutable(ubyte[]).length
length
:
(immutable global) immutable(ubyte[]) images_wired_isobmff.exifPayload
exifPayload
.
(field) ulong immutable(ubyte[]).length
length
;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(
(parameter) images_wired_isobmff.Variant variant
variant
==
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.extentOutside = 4
extentOutside
&&
(local variable) ulong i
i
== 1 ? 0x7FFF_FFF0 :
(local variable) const(ulong) length
length
, 4);
}
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.begin(string type, bool large = false)
begin
("iprp");
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.begin(string type, bool large = false)
begin
("ipco");
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("ispe", 0);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.put!(images_wired_isobmff.ImageSpatialExtents)(in images_wired_isobmff.ImageSpatialExtents value) pure nothrow @safe
put
(
(struct) images_wired_isobmff.ImageSpatialExtents

ISO/IEC 23008-12 ispe, after FullBox.

ImageSpatialExtents
(64, 48));
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
const
(local variable) const(ulong) pixiAt
pixiAt
=
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
.
(field) ulong ubyte[].length
length
;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("pixi", 0);
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= [3, 8, 8, 8];
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.beginFull(string type, ubyte version_, uint flags = 0u)
beginFull
("ipma", 0, 0);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(2, 4); // entry_count
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(1, 2);
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= 2;
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= 0x01; // ispe, not essential
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~=
(parameter) images_wired_isobmff.Variant variant
variant
==
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.propertyMissing = 5
propertyMissing
? 0x83 : 0x82; // pixi, essential
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.be(ulong value, ulong width)
be
(2, 2);
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= 0;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
(); // meta
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.begin(string type, bool large = false)
begin
("mdat", true); // size 1, 64-bit largesize
const
(local variable) const(ulong) payloadAt
payloadAt
=
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
.
(field) ulong ubyte[].length
length
;
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~=
(immutable global) immutable(ubyte[]) images_wired_isobmff.av1Payload
av1Payload
;
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~=
(immutable global) immutable(ubyte[]) images_wired_isobmff.exifPayload
exifPayload
;
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
();
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.patch(ulong at, ulong value, ulong width)
patch
(
(local variable) ulong[2] offsetAt
offsetAt
[0],
(local variable) const(ulong) payloadAt
payloadAt
, 4);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.patch(ulong at, ulong value, ulong width)
patch
(
(local variable) ulong[2] offsetAt
offsetAt
[1],
(local variable) const(ulong) payloadAt
payloadAt
+
(immutable global) immutable(ubyte[]) images_wired_isobmff.av1Payload
av1Payload
.
(field) ulong immutable(ubyte[]).length
length
, 4);
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.begin(string type, bool large = false)
begin
("free");
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
~= [0, 0, 0, 0];
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.end(bool toEnd = false)

Closes the innermost box; toEnd leaves size 0.

end
(true); // size 0: to the end of the file
if (
(parameter) images_wired_isobmff.Variant variant
variant
==
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.childOverrun = 1
childOverrun
)
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.patch(ulong at, ulong value, ulong width)
patch
(
(local variable) const(ulong) pixiAt
pixiAt
- 20, 200, 4); // ispe claims more than ipco holds
if (
(parameter) images_wired_isobmff.Variant variant
variant
==
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.sizeZeroNested = 2
sizeZeroNested
)
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.patch(ulong at, ulong value, ulong width)
patch
(
(local variable) const(ulong) pixiAt
pixiAt
, 0, 4);
if (
(parameter) images_wired_isobmff.Variant variant
variant
==
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.sizeBelowHeader = 7
sizeBelowHeader
)
(local variable) images_wired_isobmff.BoxWriter w
w
.
void images_wired_isobmff.BoxWriter.patch(ulong at, ulong value, ulong width)
patch
(0, 4, 4);
return
(local variable) images_wired_isobmff.BoxWriter w
w
.
(field) ubyte[] images_wired_isobmff.BoxWriter.bytes
bytes
;
} void
void images_wired_isobmff.report(string label, in ubyte[] bytes)
report
(
(alias) object.string = string
string
(parameter) string label
label
, in ubyte[]
(parameter) const(ubyte[]) bytes
bytes
)
{ auto
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
=
sparkles.base.expected.Expected!(Heif, BinError, Abort) images_wired_isobmff.parseHeif(in ubyte[] bytes)

GAP

the walk, nesting, versions, varying widths and the item tables.

parseHeif
(
(parameter) const(ubyte[]) bytes
bytes
);
if (
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.Heif, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasError!()() const pure nothrow @nogc @property @safe

Checks if Expected has error

hasError
)
void std.stdio.writefln!(char, string, images_wired_isobmff.BinErrorKind, ulong, string)(in char[] fmt, string __param_1, images_wired_isobmff.BinErrorKind __param_2, ulong __param_3, string __param_4) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: %s: %s at offset %s (%s)",
(parameter) string label
label
,
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.Heif, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
.
(field) images_wired_isobmff.BinErrorKind images_wired_isobmff.BinError.kind
kind
,
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.Heif, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
.
(field) ulong images_wired_isobmff.BinError.offset
offset
,
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.Heif, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
.
(field) string images_wired_isobmff.BinError.what
what
);
else
void std.stdio.writefln!(char, string)(in char[] fmt, string __param_1) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: %s: ok",
(parameter) string label
label
);
} void
void D main()
main
()
{
void std.stdio.writefln!(char, long, long, long, long, long, long)(in char[] fmt, long __param_1, long __param_2, long __param_3, long __param_4, long __param_5, long __param_6) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: schema sizes: BoxHeader %s, FullBoxHeader %s, ftyp %s, hdlr %s, infe v2 %s, ispe %s bytes",
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(template instance) sparkles.wired.schema.wireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.BoxHeader)
wireSchemaOf
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(struct) images_wired_isobmff.BoxHeader

§4.2.2: "unsigned int(32) size; unsigned int(32) type = boxtype;"

BoxHeader
), 0),
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(template instance) sparkles.wired.schema.wireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.FullBoxHeader)
wireSchemaOf
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(struct) images_wired_isobmff.FullBoxHeader

§4.2.2 FullBox: "unsigned int(8) version; bit(24) flags;" There is no 24-bit leaf, so the flags are three bytes.

FullBoxHeader
), 0),
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(template instance) sparkles.wired.schema.wireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.FileTypeFixed)
wireSchemaOf
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(struct) images_wired_isobmff.FileTypeFixed

§4.3 ftyp, before its compatible brands (which run to the box end).

FileTypeFixed
), 0),
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(template instance) sparkles.wired.schema.wireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.HandlerFixed)
wireSchemaOf
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(struct) images_wired_isobmff.HandlerFixed

§8.4.3 hdlr, after FullBox and before the NUL-terminated name.

HandlerFixed
), 0),
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(template instance) sparkles.wired.schema.wireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.ItemInfoEntryV2)
wireSchemaOf
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(struct) images_wired_isobmff.ItemInfoEntryV2

§8.11.6 infe version 2, after FullBox and before the name.

ItemInfoEntryV2
), 0),
long images_wired_isobmff.fixedSize(const(sparkles.wired.schema.WireSchema) schema, ulong index) pure nothrow @safe

Byte size of the subtree at index, or -1 when the schema gives none. Takes the schema by value: as an in parameter, CTFE fails on DMD and crashes LDC.

fixedSize
(
(template instance) sparkles.wired.schema.wireSchemaOf!(images_wired_isobmff.BeFixed, images_wired_isobmff.ImageSpatialExtents)
wireSchemaOf
!(
(struct) images_wired_isobmff.BeFixed

Format marker. Its schema hook admits only fixed-size shapes; the byte order is a property of the marker, since SchemaNode has no such field.

BeFixed
,
(struct) images_wired_isobmff.ImageSpatialExtents

ISO/IEC 23008-12 ispe, after FullBox.

ImageSpatialExtents
), 0));
const
(local variable) const(ubyte[]) bytes
bytes
=
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.valid = 0
valid
);
auto
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
=
sparkles.base.expected.Expected!(Heif, BinError, Abort) images_wired_isobmff.parseHeif(in ubyte[] bytes)

GAP

the walk, nesting, versions, varying widths and the item tables.

parseHeif
(
(local variable) const(ubyte[]) bytes
bytes
);
assert(
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
.
bool sparkles.base.expected.Expected!(images_wired_isobmff.Heif, images_wired_isobmff.BinError, sparkles.base.expected.Abort).hasValue!()() const pure nothrow @nogc @property @safe

Checks if Expected has value

hasValue
,
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
.
inout(images_wired_isobmff.BinError) sparkles.base.expected.Expected!(images_wired_isobmff.Heif, images_wired_isobmff.BinError, sparkles.base.expected.Abort).error() inout pure nothrow @nogc @property ref @safe

Returns the error value. May only be called when hasValue returns false.

If there is no error value, it calls hook's onAccessEmptyError.

It returns E.init when hook doesn't provide onAccessEmptyError.

Note

Error is returned by reference only when hook provides onAccessEmptyError. Otherwise the E.init fallback forces it to be returned by value (a copy).

error
.
(field) string images_wired_isobmff.BinError.what
what
);
const
(local variable) const(images_wired_isobmff.Heif) heif
heif
=
(local variable) sparkles.base.expected.Expected!(Heif, BinError, Abort) r
r
.
inout(images_wired_isobmff.Heif) sparkles.base.expected.Expected!(images_wired_isobmff.Heif, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
;
void std.stdio.writefln!(char, ulong, ulong, const(char[4]), const(char[4])[], const(char[4]))(in char[] fmt, ulong __param_1, ulong __param_2, const(char[4]) __param_3, const(char[4])[] __param_4, const(char[4]) __param_5) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: valid: %s bytes, %s boxes, brand %s %s, handler %s",
(local variable) const(ubyte[]) bytes
bytes
.
(field) ulong const(ubyte[]).length
length
,
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Box[] images_wired_isobmff.Heif.tree

every box visited, depth-first

tree
.
(field) ulong const(images_wired_isobmff.Box[]).length
length
,
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) char[4] images_wired_isobmff.Heif.majorBrand
majorBrand
,
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) char[4][] images_wired_isobmff.Heif.brands
brands
,
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) char[4] images_wired_isobmff.Heif.handler
handler
);
foreach (
(parameter) ulong i
i
,
(parameter) const(images_wired_isobmff.Box) box
box
;
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Box[] images_wired_isobmff.Heif.tree

every box visited, depth-first

tree
)
{
(alias) object.string = string
string
(local variable) string note
note
=
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) bool images_wired_isobmff.Box.large

size was 1 and largesize followed

large
? " largesize" :
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) bool images_wired_isobmff.Box.toEnd

size was 0

toEnd
? " size 0 (to end)" : "";
if (
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
== "uuid")
(local variable) string note
note
~= " usertype " ~ cast(
(alias) object.string = string
string
)
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ubyte[16] images_wired_isobmff.Box.usertype

for uuid

usertype
[].
immutable(ubyte)[] object.idup!(const(ubyte))(const(ubyte)[] a) pure nothrow @property @safe

Provide the .idup array property, which creates an immutable duplicate.

idup
;
void std.stdio.writefln!(char, ulong, string, const(char[4]), const(ulong), const(ulong), const(ulong), string)(in char[] fmt, ulong __param_1, string __param_2, const(char[4]) __param_3, const(ulong) __param_4, const(ulong) __param_5, const(ulong) __param_6, string __param_7) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: %*s%s @%s header %s size %s%s", 2 *
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) ulong[] images_wired_isobmff.Heif.depth
depth
[
(local variable) ulong i
i
], "",
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) char[4] images_wired_isobmff.Box.type
type
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.headerSize
headerSize
,
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.end
end
-
(local variable) const(images_wired_isobmff.Box) box
box
.
(field) ulong images_wired_isobmff.Box.start
start
,
(local variable) string note
note
);
}
void std.stdio.writefln!(char, const(ubyte), const(ubyte), const(ubyte), const(ubyte), const(ubyte))(in char[] fmt, const(ubyte) __param_1, const(ubyte) __param_2, const(ubyte) __param_3, const(ubyte) __param_4, const(ubyte) __param_5) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: iloc version %s, field sizes offset %s length %s base_offset %s index %s",
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) ubyte images_wired_isobmff.Heif.ilocVersion
ilocVersion
,
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
[0],
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
[1],
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
[2],
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) ubyte[4] images_wired_isobmff.Heif.ilocSizes

offset, length, base_offset, index

ilocSizes
[3]);
foreach (
(parameter) const(images_wired_isobmff.Item) item
item
;
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
)
{
(alias) object.string = string
string
(local variable) string props
props
;
foreach (
(parameter) ulong i
i
,
(parameter) const(uint) index
index
;
(local variable) const(images_wired_isobmff.Item) item
item
.
(field) uint[] images_wired_isobmff.Item.properties

1-based indices into ipco

properties
)
{ const
(local variable) const(images_wired_isobmff.Property) prop
prop
=
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Property[] images_wired_isobmff.Heif.properties
properties
[
(local variable) const(uint) index
index
- 1];
(local variable) string props
props
~=
string std.format.format!(" %s%s", const(char[4]), string)(const(char[4]) __param_0, string __param_1) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!" %s%s"(
(local variable) const(images_wired_isobmff.Property) prop
prop
.
(field) char[4] images_wired_isobmff.Property.type
type
,
(local variable) const(images_wired_isobmff.Item) item
item
.
(field) bool[] images_wired_isobmff.Item.essential
essential
[
(local variable) ulong i
i
] ? "(essential)" : "");
if (
(local variable) const(images_wired_isobmff.Property) prop
prop
.
(field) char[4] images_wired_isobmff.Property.type
type
== "ispe")
(local variable) string props
props
~=
string std.format.format!("=%sx%s", const(uint), const(uint))(const(uint) __param_0, const(uint) __param_1) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"=%sx%s"(
(local variable) const(images_wired_isobmff.Property) prop
prop
.
(field) images_wired_isobmff.ImageSpatialExtents images_wired_isobmff.Property.ispe
ispe
.
(field) uint images_wired_isobmff.ImageSpatialExtents.width
width
,
(local variable) const(images_wired_isobmff.Property) prop
prop
.
(field) images_wired_isobmff.ImageSpatialExtents images_wired_isobmff.Property.ispe
ispe
.
(field) uint images_wired_isobmff.ImageSpatialExtents.height
height
);
if (
(local variable) const(images_wired_isobmff.Property) prop
prop
.
(field) char[4] images_wired_isobmff.Property.type
type
== "pixi")
(local variable) string props
props
~=
string std.format.format!("=%s", const(ubyte)[])(const(ubyte)[] __param_0) pure @safe

Examples

The format string can be checked at compile-time:

auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");

// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format
!"=%s"(
(local variable) const(images_wired_isobmff.Property) prop
prop
.
(field) ubyte[] images_wired_isobmff.Property.bitsPerChannel

pixi

bitsPerChannel
);
} const
(local variable) const(images_wired_isobmff.Extent) e
e
=
(local variable) const(images_wired_isobmff.Item) item
item
.
(field) images_wired_isobmff.Extent[] images_wired_isobmff.Item.extents
extents
[0];
const
(local variable) const(bool) inMdat
inMdat
=
(local variable) const(images_wired_isobmff.Extent) e
e
.
(field) ulong images_wired_isobmff.Extent.offset
offset
>=
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Box images_wired_isobmff.Heif.mdat
mdat
.
ulong images_wired_isobmff.Box.payload() const pure nothrow @nogc @safe
payload
&&
(local variable) const(images_wired_isobmff.Extent) e
e
.
(field) ulong images_wired_isobmff.Extent.offset
offset
+
(local variable) const(images_wired_isobmff.Extent) e
e
.
(field) ulong images_wired_isobmff.Extent.length
length
<=
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Box images_wired_isobmff.Heif.mdat
mdat
.
(field) ulong images_wired_isobmff.Box.end
end
;
void std.stdio.writefln!(char, const(uint), string, const(char[4]), string, const(ulong), const(ulong), const(bool), string)(in char[] fmt, const(uint) __param_1, string __param_2, const(char[4]) __param_3, string __param_4, const(ulong) __param_5, const(ulong) __param_6, const(bool) __param_7, string __param_8) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: item %s%s %s \"%s\": %s bytes at %s, inside mdat %s, properties:%s",
(local variable) const(images_wired_isobmff.Item) item
item
.
(field) uint images_wired_isobmff.Item.id
id
,
(local variable) const(images_wired_isobmff.Item) item
item
.
(field) uint images_wired_isobmff.Item.id
id
==
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) uint images_wired_isobmff.Heif.primary
primary
? " (primary)" : "",
(local variable) const(images_wired_isobmff.Item) item
item
.
(field) char[4] images_wired_isobmff.Item.type
type
,
(local variable) const(images_wired_isobmff.Item) item
item
.
(field) string images_wired_isobmff.Item.name
name
,
(local variable) const(images_wired_isobmff.Extent) e
e
.
(field) ulong images_wired_isobmff.Extent.length
length
,
(local variable) const(images_wired_isobmff.Extent) e
e
.
(field) ulong images_wired_isobmff.Extent.offset
offset
,
(local variable) const(bool) inMdat
inMdat
,
(local variable) string props
props
.
(field) ulong string.length
length
?
(local variable) string props
props
: " none");
}
void std.stdio.writefln!(char, string)(in char[] fmt, string __param_1) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: primary item bytes: \"%s\"",
cast(
(alias) object.string = string
string
)
(local variable) const(ubyte[]) bytes
bytes
[
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
[0].
(field) images_wired_isobmff.Extent[] images_wired_isobmff.Item.extents
extents
[0].
(field) ulong images_wired_isobmff.Extent.offset
offset
..
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
[0].
(field) images_wired_isobmff.Extent[] images_wired_isobmff.Item.extents
extents
[0].
(field) ulong images_wired_isobmff.Extent.offset
offset
+
(local variable) const(images_wired_isobmff.Heif) heif
heif
.
(field) images_wired_isobmff.Item[] images_wired_isobmff.Heif.items
items
[0].
(field) images_wired_isobmff.Extent[] images_wired_isobmff.Item.extents
extents
[0].
(field) ulong images_wired_isobmff.Extent.length
length
]);
ubyte[]
(local variable) ubyte[] again
again
;
string images_wired_isobmff.encodeFixed!(images_wired_isobmff.BoxHeader)(in images_wired_isobmff.BoxHeader value, ref ubyte[] output) pure nothrow @safe

Encodes a fixed record after its checks pass, as expressiveness §6.4 requires of encode. Returns the first failure's reason, or null.

encodeFixed
(
sparkles.base.expected.Expected!(BoxHeader, BinError, Abort) images_wired_isobmff.decodeFixed!(images_wired_isobmff.BoxHeader)(in ubyte[] bytes, ulong at) pure nothrow @safe

Decodes a fixed record at at: one bounds check, the schema walk with field checks, then the type-level @WireChecks.

decodeFixed
!
(struct) images_wired_isobmff.BoxHeader

§4.2.2: "unsigned int(32) size; unsigned int(32) type = boxtype;"

BoxHeader
(
(local variable) const(ubyte[]) bytes
bytes
, 0).
inout(images_wired_isobmff.BoxHeader) sparkles.base.expected.Expected!(images_wired_isobmff.BoxHeader, images_wired_isobmff.BinError, sparkles.base.expected.Abort).value!()() inout pure nothrow @nogc @property ref @safe

Returns the expected value if there is one.

With default Abort hook, it asserts when there is no value. It calls hook's onAccessEmptyValue otherwise.

It returns T.init when hook doesn't provide onAccessEmptyValue.

Note

Value is returned by reference only when hook provides onAccessEmptyValue. Otherwise the T.init fallback forces it to be returned by value (a copy).

value
,
(local variable) ubyte[] again
again
);
void std.stdio.writefln!(char, ulong, bool)(in char[] fmt, ulong __param_1, bool __param_2) @safe

Equivalent to writef(fmt, args, '\n').

writefln
("isobmff: round trip: ftyp header re-encoded to %s bytes, identical: %s",
(local variable) ubyte[] again
again
.
(field) ulong ubyte[].length
length
,
(local variable) ubyte[] again
again
==
(local variable) const(ubyte[]) bytes
bytes
[0 .. 8]);
void images_wired_isobmff.report(string label, in ubyte[] bytes)
report
("ispe overruns ipco",
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.childOverrun = 1
childOverrun
));
void images_wired_isobmff.report(string label, in ubyte[] bytes)
report
("size 0 inside ipco",
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.sizeZeroNested = 2
sizeZeroNested
));
void images_wired_isobmff.report(string label, in ubyte[] bytes)
report
("iloc offset_size 3",
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.ilocFieldSize3 = 3
ilocFieldSize3
));
void images_wired_isobmff.report(string label, in ubyte[] bytes)
report
("Exif extent past the file",
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.extentOutside = 4
extentOutside
));
void images_wired_isobmff.report(string label, in ubyte[] bytes)
report
("ipma names property 3 of 2",
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.propertyMissing = 5
propertyMissing
));
void images_wired_isobmff.report(string label, in ubyte[] bytes)
report
("pitm names item 7",
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.primaryMissing = 6
primaryMissing
));
void images_wired_isobmff.report(string label, in ubyte[] bytes)
report
("ftyp size 4",
ubyte[] images_wired_isobmff.buildHeif(images_wired_isobmff.Variant variant)
buildHeif
(
(enum) images_wired_isobmff.Variant
Variant
.
(enum value) images_wired_isobmff.Variant.sizeBelowHeader = 7
sizeBelowHeader
));
}