Skip to main content

YamlTokenT

Type Alias YamlTokenT 

Source
pub type YamlTokenT = yaml_token_t;
👎Deprecated since 0.0.6:

libyml is unmaintained. Migrate to a maintained alternative (unsafe-libyaml, yaml-rust2, or noyalib). See MIGRATION.md.

Expand description

Aliased Type§

#[repr(C)]
pub struct YamlTokenT { pub type_: yaml_token_type_t, pub data: unnamed_yaml_token_t_data, pub start_mark: yaml_mark_t, pub end_mark: yaml_mark_t, }

Fields§

§type_: yaml_token_type_t

The token type.

§data: unnamed_yaml_token_t_data

The token data.

union {
    /// The stream start (for YAML_STREAM_START_TOKEN).
    stream_start: struct {
        /// The stream encoding.
        encoding: yaml_encoding_t,
    },
    /// The alias (for YAML_ALIAS_TOKEN).
    alias: struct {
        /// The alias value.
        value: *mut u8,
    },
    /// The anchor (for YAML_ANCHOR_TOKEN).
    anchor: struct {
        /// The anchor value.
        value: *mut u8,
    },
    /// The tag (for YAML_TAG_TOKEN).
    tag: struct {
        /// The tag handle.
        handle: *mut u8,
        /// The tag suffix.
        suffix: *mut u8,
    },
    /// The scalar value (for YAML_SCALAR_TOKEN).
    scalar: struct {
        /// The scalar value.
        value: *mut u8,
        /// The length of the scalar value.
        length: u64,
        /// The scalar style.
        style: yaml_scalar_style_t,
    },
    /// The version directive (for YAML_VERSION_DIRECTIVE_TOKEN).
    version_directive: struct {
        /// The major version number.
        major: i32,
        /// The minor version number.
        minor: i32,
    },
    /// The tag directive (for YAML_TAG_DIRECTIVE_TOKEN).
    tag_directive: struct {
        /// The tag handle.
        handle: *mut u8,
        /// The tag prefix.
        prefix: *mut u8,
    },
}
§start_mark: yaml_mark_t

The beginning of the token.

§end_mark: yaml_mark_t

The end of the token.