#[non_exhaustive]pub struct Event {
pub data: EventData,
pub start_mark: Mark,
pub end_mark: Mark,
}Expand description
The event structure.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data: EventDataThe event data.
start_mark: MarkThe beginning of the event.
end_mark: MarkThe end of the event.
Implementations§
Source§impl Event
impl Event
Sourcepub fn stream_start(encoding: Encoding) -> Self
pub fn stream_start(encoding: Encoding) -> Self
Create the STREAM-START event.
Sourcepub fn stream_end() -> Self
pub fn stream_end() -> Self
Create the STREAM-END event.
Sourcepub fn document_start(
version_directive: Option<VersionDirective>,
tag_directives_in: &[TagDirective],
implicit: bool,
) -> Self
pub fn document_start( version_directive: Option<VersionDirective>, tag_directives_in: &[TagDirective], implicit: bool, ) -> Self
Create the DOCUMENT-START event.
The implicit argument is considered as a stylistic parameter and may be
ignored by the emitter.
Sourcepub fn document_end(implicit: bool) -> Self
pub fn document_end(implicit: bool) -> Self
Create the DOCUMENT-END event.
The implicit argument is considered as a stylistic parameter and may be
ignored by the emitter.
Sourcepub fn scalar(
anchor: Option<&str>,
tag: Option<&str>,
value: &str,
plain_implicit: bool,
quoted_implicit: bool,
style: ScalarStyle,
) -> Self
pub fn scalar( anchor: Option<&str>, tag: Option<&str>, value: &str, plain_implicit: bool, quoted_implicit: bool, style: ScalarStyle, ) -> Self
Create a SCALAR event.
The style argument may be ignored by the emitter.
Either the tag attribute or one of the plain_implicit and
quoted_implicit flags must be set.
Sourcepub fn sequence_start(
anchor: Option<&str>,
tag: Option<&str>,
implicit: bool,
style: SequenceStyle,
) -> Self
pub fn sequence_start( anchor: Option<&str>, tag: Option<&str>, implicit: bool, style: SequenceStyle, ) -> Self
Create a SEQUENCE-START event.
The style argument may be ignored by the emitter.
Either the tag attribute or the implicit flag must be set.
Sourcepub fn sequence_end() -> Self
pub fn sequence_end() -> Self
Create a SEQUENCE-END event.
Sourcepub fn mapping_start(
anchor: Option<&str>,
tag: Option<&str>,
implicit: bool,
style: MappingStyle,
) -> Self
pub fn mapping_start( anchor: Option<&str>, tag: Option<&str>, implicit: bool, style: MappingStyle, ) -> Self
Create a MAPPING-START event.
The style argument may be ignored by the emitter.
Either the tag attribute or the implicit flag must be set.
Sourcepub fn mapping_end() -> Self
pub fn mapping_end() -> Self
Create a MAPPING-END event.