Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
mir.ion.value
- struct
IonVersionMarker
; - Ion Version Marker
- ubyte
major
; - Major Version
- ubyte
minor
; - Minor Version
- template
IonType
(IonTypeCode code : IonTypeCode.null_)
templateIonType
(IonTypeCode code : IonTypeCode.bool_)
templateIonType
(IonTypeCode code : IonTypeCode.uInt)
templateIonType
(IonTypeCode code : IonTypeCode.nInt)
templateIonType
(IonTypeCode code : IonTypeCode.float_)
templateIonType
(IonTypeCode code : IonTypeCode.decimal)
templateIonType
(IonTypeCode code : IonTypeCode.timestamp)
templateIonType
(IonTypeCode code : IonTypeCode.symbol)
templateIonType
(IonTypeCode code : IonTypeCode.string)
templateIonType
(IonTypeCode code : IonTypeCode.clob)
templateIonType
(IonTypeCode code : IonTypeCode.blob)
templateIonType
(IonTypeCode code : IonTypeCode.list)
templateIonType
(IonTypeCode code : IonTypeCode.sexp)
templateIonType
(IonTypeCode code : IonTypeCode.struct_)
templateIonType
(IonTypeCode code : IonTypeCode.annotations) - Aliases the to the corresponding Ion Typed Value type.
- template
IonTypeCodeOf
(T : IonNull)
templateIonTypeCodeOf
(T : bool)
templateIonTypeCodeOf
(T : IonUInt)
templateIonTypeCodeOf
(T : IonNInt)
templateIonTypeCodeOf
(T : IonFloat)
templateIonTypeCodeOf
(T : IonDecimal)
templateIonTypeCodeOf
(T : IonTimestamp)
templateIonTypeCodeOf
(T : IonSymbolID)
templateIonTypeCodeOf
(T : const(char)[])
templateIonTypeCodeOf
(T : Clob)
templateIonTypeCodeOf
(T : Blob)
templateIonTypeCodeOf
(T : IonList)
templateIonTypeCodeOf
(T : IonSexp)
templateIonTypeCodeOf
(T : IonStruct)
templateIonTypeCodeOf
(T : IonAnnotationWrapper) - Aliases the type to the corresponding .
- enum auto
isIonType
(T);
enum autoisIonType
(T : IonNull);
enum autoisIonType
(T : bool);
enum autoisIonType
(T : IonUInt);
enum autoisIonType
(T : IonNInt);
enum autoisIonType
(T : IonFloat);
enum autoisIonType
(T : IonDecimal);
enum autoisIonType
(T : IonTimestamp);
enum autoisIonType
(T : IonSymbolID);
enum autoisIonType
(T : const(char)[]);
enum autoisIonType
(T : Clob);
enum autoisIonType
(T : Blob);
enum autoisIonType
(T : IonList);
enum autoisIonType
(T : IonSexp);
enum autoisIonType
(T : IonStruct);
enum autoisIonType
(T : IonAnnotationWrapper); - A template to check if the type is one of Ion Typed Value types.See Also:
- struct
IonNull
; - Ion null value.
- IonTypeCode
code
; - const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonValue
; - Ion ValueThe type descriptor octet has two subfields: a four-bit type code T, and a four-bit length L.
7 4 3 0 ---------+---------+ value | T | L | ---------+---------+======+ : length [VarUInt] : ==========================+ : representation : ==========================+
Examples:import mir.lob; import mir.ion.type_code; import mir.ion.value; // null.string assert(IonValue([0x9F]).describe.get!IonNull == IonNull(IonTypeCode.clob)); // empty string assert(IonValue([0x90]).describe.get!Clob.data == ""); assert(IonValue([0x95, 0x63, 0x6f, 0x76, 0x69, 0x64]).describe.get!Clob.data == "covid");
Examples:import mir.lob; import mir.ion.type_code; import mir.ion.value; // null.string assert(IonValue([0xAF]).describe.get!IonNull == IonNull(IonTypeCode.blob)); // empty string assert(IonValue([0xA0]).describe.get!Blob.data == ""); assert(IonValue([0xA5, 0x63, 0x6f, 0x76, 0x69, 0x64]).describe.get!Blob.data == "covid");
- const pure nothrow @nogc @safe IonErrorCode
describe
()(ref scope IonDescribedValuevalue
); - Describes value (nothrow version).Parameters:
IonDescribedValue value
(out) IonDescribedValue Returns: - const pure @nogc @safe IonDescribedValue
describe
()(); - Describes value.Returns:
- const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer Examples:import mir.ion.stream; import mir.ser.json; assert(IonValueStream([0x11]).serializeJson == "true");
- struct
IonDescriptor
; - Ion Type Descriptor
- pure nothrow @nogc @safe this(scope const(ubyte)*
reference
); - The type descriptor octet has two subfields: a four-bit type code T, and a four-bit length L.
- IonTypeCode
type
; - T
- uint
L
; - L
- struct
IonDescribedValue
; - Ion Described Value stores type descriptor and rerpresentation.
- IonDescriptor
descriptor
; - Type Descriptor
- const(ubyte)[]
data
; - Rerpresentation
- const pure nothrow @nogc @safe bool
opEquals
()(typeof(null)); - Returns:true if the value is any Ion null.
- const pure nothrow @nogc @safe bool
opEquals
()(IonDescribedValuerhs
); - Returns:true if the values have the same binary representation.
- const pure nothrow @nogc @safe IonErrorCode
get
(T)(ref Tvalue
)
if (isIonType!T || is(T == IonInt)); - Gets typed value (nothrow version).Parameters:
T value
(out) Ion Typed Value Returns: - const pure @nogc @safe T
get
(T)()
if (isIonType!T || is(T == IonInt)); - Gets typed value.Returns:Ion Typed Value
- const pure nothrow @nogc @safe T
trustedGet
(T)()
if (isIonType!T || is(T == IonInt)); - Gets typed value (nothrow internal version).Returns:Ion Typed Value
Note This function doesn't check the encoded value type.
- const @safe void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonIntField
; - Ion integer field.Examples:
assert(IonValue([0x1F]).describe.get!IonNull.code == IonTypeCode.bool_); assert(IonValue([0x10]).describe.get!bool == false); assert(IonValue([0x11]).describe.get!bool == true);
- const(ubyte)[]
data
; - const pure nothrow @nogc @safe IonErrorCode
get
(T)(ref scope Tvalue
)
if (isSigned!T); - Parameters:
T value
(out) signed integer Returns: - const pure @nogc @safe T
get
(T)()
if (isSigned!T); - Returns:signed integer
Precondition this != null.
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
(T)()
if (isSigned!T); - Returns:
Precondition this != null.
- struct
IonUInt
; - Ion non-negative integer number.Examples:
assert(IonValue([0x2F]).describe.get!IonNull == IonNull(IonTypeCode.uInt)); assert(IonValue([0x21, 0x07]).describe.get!IonUInt.get!int == 7); int v; assert(IonValue([0x22, 0x01, 0x04]).describe.get!IonUInt.get(v) == IonErrorCode.none); assert(v == 260);
- BigUIntView!(const(ubyte), WordEndian.big)
field
; - const pure nothrow @nogc @safe bool
opEquals
(ulongrhs
); - Returns:true if the integer isn't null.int and equals to
rhs
. - const pure nothrow @nogc @trusted IonErrorCode
get
(T)(ref scope Tvalue
)
if (isIntegral!T); - Parameters:
T value
(out) unsigned or signed integer Returns: - const pure @nogc @safe T
get
(T)()
if (isIntegral!T); - Returns:unsigned or signed integer
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
(T)()
if (isIntegral!T); - Returns:
- struct
IonNInt
; - Ion negative integer number.Examples:
assert(IonValue([0x3F]).describe.get!IonNull == IonNull(IonTypeCode.nInt)); assert(IonValue([0x31, 0x07]).describe.get!IonNInt.get!int == -7); long v; assert(IonValue([0x32, 0x01, 0x04]).describe.get!IonNInt.get(v) == IonErrorCode.none); assert(v == -260); // IonNInt can't store zero according to the Ion Binary format specification. assert(IonValue([0x30]).describe.get!IonNInt.getErrorCode!byte == IonErrorCode.overflowInIntegerValue);
- BigUIntView!(const(ubyte), WordEndian.big)
field
; - const pure nothrow @nogc @safe bool
opEquals
(longrhs
); - Returns:true if the integer isn't null.int and equals to
rhs
. - const pure nothrow @nogc @trusted IonErrorCode
get
(T)(ref scope Tvalue
)
if (isIntegral!T); - Parameters:
T value
(out) signed or unsigned integer Returns: - const pure @nogc @safe T
get
(T)()
if (isIntegral!T); - Returns:unsigned or signed integer
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
(T)()
if (isIntegral!T); - Returns:
- struct
IonInt
; - Ion signed integer number.Examples:test with IonUInts
import mir.ion.exception; assert(IonValue([0x2F]).describe.get!IonNull == IonNull(IonTypeCode.uInt)); assert(IonValue([0x21, 0x07]).describe.get!IonInt.get!int == 7); assert(IonValue([0x20]).describe.get!IonInt.get!int == 0); int v; assert(IonValue([0x22, 0x01, 0x04]).describe.get!IonInt.get(v) == IonErrorCode.none); assert(v == 260);
Examples:test with IonNIntsimport mir.ion.exception; assert(IonValue([0x3F]).describe.get!IonNull == IonNull(IonTypeCode.nInt)); assert(IonValue([0x31, 0x07]).describe.get!IonInt.get!int == -7); long v; assert(IonValue([0x32, 0x01, 0x04]).describe.get!IonInt.get(v) == IonErrorCode.none); assert(v == -260); // IonNInt can't store zero according to the Ion Binary format specification. assert(IonValue([0x30]).describe.get!IonInt.getErrorCode!byte == IonErrorCode.overflowInIntegerValue);
- BigIntView!(const(ubyte), WordEndian.big)
field
; - const pure nothrow @nogc @trusted IonErrorCode
get
(T)(ref scope Tvalue
)
if (isIntegral!T); - Parameters:
T value
(out) signed or unsigned integer Returns: - const pure @nogc @safe T
get
(T)()
if (isIntegral!T); - Returns:unsigned or signed integer
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
(T)()
if (isIntegral!T); - Returns:
- const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonFloat
; - Ion floating point number.Examples:
// null assert(IonValue([0x4F]).describe.get!IonNull == IonNull(IonTypeCode.float_)); // zero auto ionFloat = IonValue([0x40]).describe.get!IonFloat; assert(ionFloat.get!float == 0); assert(ionFloat.get!double == 0); assert(ionFloat.get!real == 0); // single ionFloat = IonValue([0x44, 0x42, 0xAA, 0x40, 0x00]).describe.get!IonFloat; assert(ionFloat.get!float == 85.125); assert(ionFloat.get!double == 85.125); assert(ionFloat.get!real == 85.125); // double ionFloat = IonValue([0x48, 0x40, 0x55, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00]).describe.get!IonFloat; assert(ionFloat.get!float == 85.125); assert(ionFloat.get!double == 85.125); assert(ionFloat.get!real == 85.125);
- const(ubyte)[]
data
; - const pure nothrow @nogc @safe IonErrorCode
get
(T)(ref scope Tvalue
)
if (isFloatingPoint!T); - Parameters:
T value
(out) float, double, or real Returns: - const pure @nogc @safe T
get
(T)()
if (isFloatingPoint!T); - Returns:floating point number
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
(T)()
if (isFloatingPoint!T); - Returns:
- const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonDescribedDecimal
; -
- int
exponent
; - IonIntField
coefficient
; - const pure nothrow @nogc @safe IonErrorCode
get
(size_t maxW64bitSize)(ref scope Decimal!maxW64bitSizevalue
); - const pure nothrow @nogc @safe IonErrorCode
get
(T)(ref scope Tvalue
)
if (isFloatingPoint!T && isMutable!T); - Parameters:
T value
(out) floating point number Returns: - const pure @nogc @safe T
get
(T = double)()
if (isFloatingPoint!T); - Returns:floating point number
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
()()
if (isFloatingPoint!T); - Returns:
- const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonDecimal
; - Ion described decimal number.Examples:
// null.decimal assert(IonValue([0x5F]).describe.get!IonNull == IonNull(IonTypeCode.decimal)); auto describedDecimal = IonValue([0x56, 0x50, 0xcb, 0x80, 0xbc, 0x2d, 0x86]).describe.get!IonDecimal.get; assert(describedDecimal.exponent == -2123); assert(describedDecimal.coefficient.get!int == -12332422); describedDecimal = IonValue([0x56, 0x00, 0xcb, 0x80, 0xbc, 0x2d, 0x86]).describe.get!IonDecimal.get; assert(describedDecimal.get!double == -12332422e75); assert(IonValue([0x50]).describe.get!IonDecimal.get!double == 0); assert(IonValue([0x51, 0x83]).describe.get!IonDecimal.get!double == 0); assert(IonValue([0x53, 0xc3, 0xb0, 0x39]).describe.get!IonDecimal.get!double == -12.345);
- const(ubyte)[]
data
; - const pure nothrow @nogc @safe IonErrorCode
get
(T : IonDescribedDecimal)(ref scope Tvalue
); - Describes decimal (nothrow version).Parameters:
T value
(out) IonDescribedDecimal Returns: - const pure nothrow @nogc @safe IonErrorCode
get
(T)(ref scope Tvalue
)
if (isFloatingPoint!T); - Parameters:
T value
(out) floating point number Returns: - const pure @nogc @safe T
get
(T = IonDescribedDecimal)(); - Describes decimal.Returns:
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
(T = IonDescribedDecimal)(); - Returns:
- const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonTimestamp
; - Ion TimestampTimestamp representations have 7 components, where 5 of these components are optional depending on the precision of the timestamp. The 2 non-optional components are offset and year. The 5 optional components are (from least precise to most precise): month, day, hour and minute, second, fraction_exponent and fraction_coefficient. All of these 7 components are in Universal Coordinated Time (UTC).Examples:
import mir.timestamp; // null.timestamp assert(IonValue([0x6F]).describe.get!IonNull == IonNull(IonTypeCode.timestamp)); ubyte[][] set = [ [0x68, 0x80, 0x0F, 0xD0, 0x87, 0x88, 0x82, 0x83, 0x84, ], // 2000-07-08T02:03:04Z with no fractional seconds [0x69, 0x80, 0x0F, 0xD0, 0x87, 0x88, 0x82, 0x83, 0x84, 0x80, ], // The same instant with 0d0 fractional seconds and implicit zero coefficient [0x6A, 0x80, 0x0F, 0xD0, 0x87, 0x88, 0x82, 0x83, 0x84, 0x80, 00], // The same instant with 0d0 fractional seconds and explicit zero coefficient [0x69, 0x80, 0x0F, 0xD0, 0x87, 0x88, 0x82, 0x83, 0x84, 0xC0, ], // The same instant with 0d-0 fractional seconds [0x69, 0x80, 0x0F, 0xD0, 0x87, 0x88, 0x82, 0x83, 0x84, 0x81, ], // The same instant with 0d1 fractional seconds ]; auto r = Timestamp(2000, 7, 8, 2, 3, 4); foreach(data; set) { assert(IonValue(data).describe.get!IonTimestamp.get == r); } assert(IonValue([0x69, 0x80, 0x0F, 0xD0, 0x87, 0x88, 0x82, 0x83, 0x84, 0xC2]) .describe .get!IonTimestamp .get == Timestamp(2000, 7, 8, 2, 3, 4, -2, 0)); assert(IonValue([0x6A, 0x80, 0x0F, 0xD0, 0x87, 0x88, 0x82, 0x83, 0x84, 0xC3, 0x10]) .describe .get!IonTimestamp .get == Timestamp(2000, 7, 8, 2, 3, 4, -3, 16));
- const(ubyte)[]
data
; - const pure nothrow @nogc @safe IonErrorCode
get
(T : Timestamp)(ref scope Tvalue
); - Describes decimal (nothrow version).Parameters:
T value
(out) Timestamp Returns: - const pure @nogc @safe Timestamp
get
(T = Timestamp)(); - Describes decimal.Returns:
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
(T = Timestamp)(); - Returns:
- const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonSymbolID
; - Ion Symbol IdIn the binary encoding, all Ion symbols are stored as integer symbol IDs whose text values are provided by a symbol table. If L is zero then the symbol ID is zero and the length and symbol ID fields are omitted.Examples:
assert(IonValue([0x7F]).describe.get!IonNull == IonNull(IonTypeCode.symbol)); assert(IonValue([0x71, 0x07]).describe.get!IonSymbolID.get == 7); size_t v; assert(IonValue([0x72, 0x01, 0x04]).describe.get!IonSymbolID.get(v) == IonErrorCode.none); assert(v == 260);
Examples:// null.string assert(IonValue([0x8F]).describe.get!IonNull == IonNull(IonTypeCode.string)); // empty string assert(IonValue([0x80]).describe.get!(const(char)[]) !is null); assert(IonValue([0x80]).describe.get!(const(char)[]) == ""); assert(IonValue([0x85, 0x63, 0x6f, 0x76, 0x69, 0x64]).describe.get!(const(char)[]) == "covid");
- BigUIntView!(const(ubyte), WordEndian.big)
representation
; - const pure nothrow @nogc @safe IonErrorCode
get
(T)(ref scope Tvalue
)
if (isUnsigned!T); - Parameters:
T value
(out) symbol id Returns: - const pure @nogc @safe T
get
(T = size_t)()
if (isUnsigned!T); - Returns:unsigned or signed integer
- const pure nothrow @nogc @trusted IonErrorCode
getErrorCode
(T = size_t)()
if (isUnsigned!T); - Returns:
- const void
serialize
(S)(ref Sserializer
); - Serializes SymbolId as Ion value.
Note This serialization shouldn't be used for struct keys or annotation list.
Parameters:S serializer
serializer with putSymbolId primitive.
- struct
IonList
; - Ion List (array)Examples:
// check parsing with NOP padding: // [NOP, int, NOP, double, NOP] auto list = IonValue([0xbe, 0x91, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x48, 0x43, 0x0c, 0x6b, 0xf5, 0x26, 0x34, 0x00, 0x00, 0x00, 0x00]) .describe.get!IonList; size_t i; foreach (elem; list) { if (i == 0) assert(elem.get!IonUInt.get!int == 12); if (i == 1) assert(elem.get!IonFloat.get!double == 100e13); i++; } assert(i == 2);
- const(ubyte)[]
data
; - const pure nothrow @nogc @property @safe bool
empty
(); - Returns:true if the sexp is null.sexp, null, or ().
Note a NOP padding makes in the struct makes it non-empty.
- const pure @nogc @safe int
opApply
(scope int delegate(IonDescribedValue value) pure @nogc @safedg
);
const @nogc @trusted intopApply
(scope int delegate(IonDescribedValue value) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(IonDescribedValue value) pure @safedg
);
const @trusted intopApply
(scope int delegate(IonDescribedValue value) @safedg
);
const pure @nogc @system intopApply
(scope int delegate(IonDescribedValue value) pure @nogc @systemdg
);
const @nogc @system intopApply
(scope int delegate(IonDescribedValue value) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(IonDescribedValue value) pure @systemdg
);
const @system intopApply
(scope int delegate(IonDescribedValue value) @systemdg
); - const pure nothrow @nogc @safe int
opApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure nothrow @nogc @safedg
);
const nothrow @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) nothrow @nogc @safedg
);
const pure @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure @nogc @safedg
);
const pure nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure nothrow @safedg
);
const @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure @safedg
);
const nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) nothrow @safedg
);
const @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) @safedg
);
const pure nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure nothrow @nogc @systemdg
);
const nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) nothrow @nogc @systemdg
);
const pure @nogc @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure @nogc @systemdg
);
const pure nothrow @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure nothrow @systemdg
);
const @nogc @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure @systemdg
);
const nothrow @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) nothrow @systemdg
);
const @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) @systemdg
); - const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer - const pure @nogc @property @safe size_t
walkLength
();
- struct
IonSexp
; - Ion Sexp (symbol expression, array)Examples:
// check parsing with NOP padding: // (NOP int NOP double NOP) auto list = IonValue([0xce, 0x91, 0x00, 0x00, 0x21, 0x0c, 0x00, 0x00, 0x48, 0x43, 0x0c, 0x6b, 0xf5, 0x26, 0x34, 0x00, 0x00, 0x00, 0x00]) .describe.get!IonSexp; size_t i; foreach (elem; list) { if (i == 0) assert(elem.get!IonUInt.get!int == 12); if (i == 1) assert(elem.get!IonFloat.get!double == 100e13); i++; } assert(i == 2);
- const(ubyte)[]
data
; - data view.
- const pure nothrow @nogc @property @safe bool
empty
(); - Returns:true if the sexp is null.sexp, null, or ().
Note a NOP padding makes in the struct makes it non-empty.
- const pure @nogc @safe int
opApply
(scope int delegate(IonDescribedValue value) pure @nogc @safedg
);
const @nogc @trusted intopApply
(scope int delegate(IonDescribedValue value) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(IonDescribedValue value) pure @safedg
);
const @trusted intopApply
(scope int delegate(IonDescribedValue value) @safedg
);
const pure @nogc @system intopApply
(scope int delegate(IonDescribedValue value) pure @nogc @systemdg
);
const @nogc @system intopApply
(scope int delegate(IonDescribedValue value) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(IonDescribedValue value) pure @systemdg
);
const @system intopApply
(scope int delegate(IonDescribedValue value) @systemdg
); - const pure nothrow @nogc @safe int
opApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure nothrow @nogc @safedg
);
const nothrow @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) nothrow @nogc @safedg
);
const pure @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure @nogc @safedg
);
const pure nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure nothrow @safedg
);
const @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure @safedg
);
const nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) nothrow @safedg
);
const @trusted intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) @safedg
);
const pure nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure nothrow @nogc @systemdg
);
const nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) nothrow @nogc @systemdg
);
const pure @nogc @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure @nogc @systemdg
);
const pure nothrow @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure nothrow @systemdg
);
const @nogc @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) pure @systemdg
);
const nothrow @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) nothrow @systemdg
);
const @system intopApply
(scope int delegate(IonErrorCode error, IonDescribedValue value) @systemdg
); - const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer - const pure @nogc @property @safe size_t
walkLength
();
- struct
IonElementWithId
; -
- IonDescribedValue
value
; - Ion described value
- IonErrorCode
error
; - Error code
- size_t
id
; - Symbol ID
- struct
IonElement
; -
- IonDescribedValue
value
; - Ion described value
- IonErrorCode
error
; - Error code
- struct
IonStruct
; - Ion struct (object)Examples:
// null.struct assert(IonValue([0xDF]).describe.get!IonNull == IonNull(IonTypeCode.struct_)); // empty struct auto ionStruct = IonValue([0xD0]).describe.get!IonStruct; size_t i; foreach (symbolID, elem; ionStruct) i++; assert(i == 0); // added two 2-bytes NOP padings 0x8F 0x00 ionStruct = IonValue([0xDE, 0x91, 0x8F, 0x00, 0x8A, 0x21, 0x0C, 0x8B, 0x48, 0x43, 0x0C, 0x6B, 0xF5, 0x26, 0x34, 0x00, 0x00, 0x8F, 0x00]) .describe .get!IonStruct; foreach (symbolID, elem; ionStruct) { if (i == 0) { assert(symbolID == 10); assert(elem.get!IonUInt.get!int == 12); } if (i == 1) { assert(symbolID == 11); assert(elem.get!IonFloat.get!double == 100e13); } i++; } assert(i == 2);
- IonDescriptor
descriptor
; - const(ubyte)[]
data
; - const pure nothrow @nogc @property @safe bool
sorted
(); - const pure nothrow @nogc @property @safe bool
empty
(); - Returns:true if the struct is null.struct, null, or ().
Note a NOP padding makes in the struct makes it non-empty.
- const pure @nogc @safe int
opApply
(scope int delegate(size_t symbolID, IonDescribedValue value) pure @nogc @safedg
);
const @nogc @trusted intopApply
(scope int delegate(size_t symbolID, IonDescribedValue value) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(size_t symbolID, IonDescribedValue value) pure @safedg
);
const @trusted intopApply
(scope int delegate(size_t symbolID, IonDescribedValue value) @safedg
);
const pure @nogc @system intopApply
(scope int delegate(size_t symbolID, IonDescribedValue value) pure @nogc @systemdg
);
const @nogc @system intopApply
(scope int delegate(size_t symbolID, IonDescribedValue value) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(size_t symbolID, IonDescribedValue value) pure @systemdg
);
const @system intopApply
(scope int delegate(size_t symbolID, IonDescribedValue value) @systemdg
); - const pure nothrow @nogc @safe int
opApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) pure nothrow @nogc @safedg
);
const nothrow @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) nothrow @nogc @safedg
);
const pure @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) pure @nogc @safedg
);
const pure nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) pure nothrow @safedg
);
const @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) pure @safedg
);
const nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) nothrow @safedg
);
const @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) @safedg
);
const pure nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) pure nothrow @nogc @systemdg
);
const nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) nothrow @nogc @systemdg
);
const pure @nogc @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) pure @nogc @systemdg
);
const pure nothrow @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) pure nothrow @systemdg
);
const @nogc @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) pure @systemdg
);
const nothrow @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) nothrow @systemdg
);
const @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID, IonDescribedValue value) @systemdg
); - const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer - const pure nothrow @nogc @safe IonStructWithSymbols
withSymbols
(return scope const(char[])[]symbolTable
) return; - const pure @nogc @property @safe size_t
walkLength
();
- struct
IonStructWithSymbols
; - Ion struct (object) with a symbol table
- IonStruct
ionStruct
; - const(char[])[]
symbolTable
; - const pure nothrow @nogc @property @safe bool
sorted
(); - const pure nothrow @nogc @property @safe bool
empty
(); - Returns:true if the struct is null.struct, null, or ().
Note a NOP padding makes in the struct makes it non-empty.
- const pure @nogc @safe int
opApply
(scope int delegate(scope const(char)[] symbol, IonDescribedValue value) pure @nogc @safedg
);
const @nogc @trusted intopApply
(scope int delegate(scope const(char)[] symbol, IonDescribedValue value) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(scope const(char)[] symbol, IonDescribedValue value) pure @safedg
);
const @trusted intopApply
(scope int delegate(scope const(char)[] symbol, IonDescribedValue value) @safedg
);
const pure @nogc @system intopApply
(scope int delegate(scope const(char)[] symbol, IonDescribedValue value) pure @nogc @systemdg
);
const @nogc @system intopApply
(scope int delegate(scope const(char)[] symbol, IonDescribedValue value) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(scope const(char)[] symbol, IonDescribedValue value) pure @systemdg
);
const @system intopApply
(scope int delegate(scope const(char)[] symbol, IonDescribedValue value) @systemdg
); - const pure nothrow @nogc @safe int
opApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) pure nothrow @nogc @safedg
);
const nothrow @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) nothrow @nogc @safedg
);
const pure @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) pure @nogc @safedg
);
const pure nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) pure nothrow @safedg
);
const @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) pure @safedg
);
const nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) nothrow @safedg
);
const @trusted intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) @safedg
);
const pure nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) pure nothrow @nogc @systemdg
);
const nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) nothrow @nogc @systemdg
);
const pure @nogc @system intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) pure @nogc @systemdg
);
const pure nothrow @system intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) pure nothrow @systemdg
);
const @nogc @system intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) pure @systemdg
);
const nothrow @system intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) nothrow @systemdg
);
const @system intopApply
(scope int delegate(IonErrorCode error, scope const(char)[] symbol, IonDescribedValue value) @systemdg
); - const pure @safe auto
opIndex
(scope const(char)[]symbol
); - Returns:
- const pure @nogc @safe Nullable!IonDescribedValue
opBinaryRight
(string op : "in")(scope const(char)[]symbol
); - const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonAnnotationWrapper
; - Ion Annotation WrapperExamples:
// null.struct IonAnnotations annotations; assert(IonValue([0xE7, 0x82, 0x8A, 0x8B, 0x53, 0xC3, 0x04, 0x65]) .describe .get!IonAnnotationWrapper .unwrap(annotations) .get!IonDecimal .get!double == 1.125); size_t i; foreach (symbolID; annotations) { if (i == 0) { assert(symbolID == 10); } if (i == 1) { assert(symbolID == 11); } i++; } assert(i == 2);
- const(ubyte)[]
data
; - const pure nothrow @nogc @safe IonErrorCode
unwrap
()(ref scope IonAnnotationsannotations
, ref scope IonDescribedValuevalue
);
const pure nothrow @nogc @safe IonErrorCodeunwrap
()(ref scope IonAnnotationsannotations
, ref scope IonValuevalue
); - Unwraps Ion annotations (nothrow version).Parameters:
IonAnnotations annotations
(out) IonAnnotations IonDescribedValue value
(out, optional) IonDescribedValue or IonValue Returns: - const pure @nogc @safe IonDescribedValue
unwrap
()(ref scope IonAnnotationsannotations
);
const pure @nogc @safe IonDescribedValueunwrap
(); - Unwraps Ion annotations.Parameters:
IonAnnotations annotations
(optional out) IonAnnotations Returns: - const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
- struct
IonAnnotations
; - List of annotations represented as symbol IDs.
- const(ubyte)[]
data
; - const pure nothrow @nogc @property @safe bool
empty
(); - Returns:true if no annotations provided.
- pure nothrow @nogc @safe IonErrorCode
pick
(ref size_tsymbolID
); - const pure @nogc @safe int
opApply
(scope int delegate(size_t symbolID) pure @nogc @safedg
);
const @nogc @trusted intopApply
(scope int delegate(size_t symbolID) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(size_t symbolID) pure @safedg
);
const @trusted intopApply
(scope int delegate(size_t symbolID) @safedg
);
const pure @nogc @system intopApply
(scope int delegate(size_t symbolID) pure @nogc @systemdg
);
const @nogc @system intopApply
(scope int delegate(size_t symbolID) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(size_t symbolID) pure @systemdg
);
const @system intopApply
(scope int delegate(size_t symbolID) @systemdg
); - const pure nothrow @nogc @safe int
opApply
(scope int delegate(IonErrorCode error, size_t symbolID) pure nothrow @nogc @safedg
);
const nothrow @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) nothrow @nogc @safedg
);
const pure @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) pure @nogc @safedg
);
const pure nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) pure nothrow @safedg
);
const @nogc @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) @nogc @safedg
);
const pure @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) pure @safedg
);
const nothrow @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) nothrow @safedg
);
const @trusted intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) @safedg
);
const pure nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) pure nothrow @nogc @systemdg
);
const nothrow @nogc @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) nothrow @nogc @systemdg
);
const pure @nogc @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) pure @nogc @systemdg
);
const pure nothrow @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) pure nothrow @systemdg
);
const @nogc @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) @nogc @systemdg
);
const pure @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) pure @systemdg
);
const nothrow @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) nothrow @systemdg
);
const @system intopApply
(scope int delegate(IonErrorCode error, size_t symbolID) @systemdg
); - const void
serialize
(S)(ref Sserializer
); - Parameters:
S serializer
serializer
Copyright © 2016-2022 by Ilya Yaroshenko | Page generated by
Ddoc on Thu Mar 10 07:43:26 2022