dyaml.event
YAML events. Code based on PyYAML: http://www.pyyaml.org
alias aliasEvent mappingEndEvent mappingStartEvent sequenceEndEvent sequenceStartEvent streamEndEvent
enum EventID
struct Event
Types 8
enumEventID : ubyte
Event types.
invalid = 0Invalid (uninitialized) event.
streamStartStream start
streamEndStream end
documentStartDocument start
documentEndDocument end
alias_Alias
scalarScalar
sequenceStartSequence start
sequenceEndSequence end
mappingStartMapping start
mappingEndMapping end
structEvent
YAML event produced by parser.
48 bytes on 64bit.
Fields
string valueValue of the event, if any.Mark startMarkStart position of the event in file/stream.Mark endMarkEnd position of the event in file/stream.EventID idEvent type.ScalarStyle scalarStyleStyle of scalar event, if this is a scalar event.bool implicitShould the tag be implicitly resolved?CollectionStyle collectionStyleCollection style, if this is a SequenceStart or MappingStart.Methods
void toString(W)(ref W writer) constaliasstreamEndEvent = event!(EventID.streamEnd)
Aliases for simple events.
aliasaliasEvent = event!(EventID.alias_)
aliassequenceEndEvent = event!(EventID.sequenceEnd)
aliasmappingEndEvent = event!(EventID.mappingEnd)
aliassequenceStartEvent = collectionStartEvent!(EventID.sequenceStart)
Aliases for collection start events.
aliasmappingStartEvent = collectionStartEvent!(EventID.mappingStart)
Functions 6
fn
Event event(EventID id)(const Mark start, const Mark end, const string anchor = null) @safeConstruct a simple event.fn
Event collectionStartEvent(EventID id)(const Mark start, const Mark end, const string anchor, const string tag,
const bool implicit, const CollectionStyle style) pure @safe nothrowConstruct a collection (mapping or sequence) start event.fn
Event streamStartEvent(const Mark start, const Mark end) pure @safe nothrowConstruct a stream start event.fn
Event documentStartEvent(const Mark start, const Mark end, const bool explicit, string YAMLVersion,
TagDirective[] tagDirectives) pure @safe nothrowConstruct a document start event.fn
Event documentEndEvent(const Mark start, const Mark end, const bool explicit) pure @safe nothrowConstruct a document end event.fn
Event scalarEvent(const Mark start, const Mark end, const string anchor, const string tag,
const bool implicit, const string value,
const ScalarStyle style = ScalarStyle.invalid) @safe pure nothrow @nogcConstruct a scalar event.