use crate::libc;
use core::ops::Deref;
use core::ptr::{self, addr_of};
pub use self::{yaml_encoding_t::*, yaml_event_type_t::*, yaml_node_type_t::*};
pub use core::primitive::{i64 as ptrdiff_t, u64 as size_t, u8 as yaml_char_t};
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_version_directive_t {
pub major: libc::c_int,
pub minor: libc::c_int,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_tag_directive_t {
pub handle: *mut yaml_char_t,
pub prefix: *mut yaml_char_t,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_encoding_t {
YAML_ANY_ENCODING = 0,
YAML_UTF8_ENCODING = 1,
YAML_UTF16LE_ENCODING = 2,
YAML_UTF16BE_ENCODING = 3,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_break_t {
YAML_ANY_BREAK = 0,
YAML_CR_BREAK = 1,
YAML_LN_BREAK = 2,
YAML_CRLN_BREAK = 3,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_error_type_t {
YAML_NO_ERROR = 0,
YAML_MEMORY_ERROR = 1,
YAML_READER_ERROR = 2,
YAML_SCANNER_ERROR = 3,
YAML_PARSER_ERROR = 4,
YAML_COMPOSER_ERROR = 5,
YAML_WRITER_ERROR = 6,
YAML_EMITTER_ERROR = 7,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_mark_t {
pub index: size_t,
pub line: size_t,
pub column: size_t,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_scalar_style_t {
YAML_ANY_SCALAR_STYLE = 0,
YAML_PLAIN_SCALAR_STYLE = 1,
YAML_SINGLE_QUOTED_SCALAR_STYLE = 2,
YAML_DOUBLE_QUOTED_SCALAR_STYLE = 3,
YAML_LITERAL_SCALAR_STYLE = 4,
YAML_FOLDED_SCALAR_STYLE = 5,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_sequence_style_t {
YAML_ANY_SEQUENCE_STYLE = 0,
YAML_BLOCK_SEQUENCE_STYLE = 1,
YAML_FLOW_SEQUENCE_STYLE = 2,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_mapping_style_t {
YAML_ANY_MAPPING_STYLE = 0,
YAML_BLOCK_MAPPING_STYLE = 1,
YAML_FLOW_MAPPING_STYLE = 2,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_token_type_t {
YAML_NO_TOKEN = 0,
YAML_STREAM_START_TOKEN = 1,
YAML_STREAM_END_TOKEN = 2,
YAML_VERSION_DIRECTIVE_TOKEN = 3,
YAML_TAG_DIRECTIVE_TOKEN = 4,
YAML_DOCUMENT_START_TOKEN = 5,
YAML_DOCUMENT_END_TOKEN = 6,
YAML_BLOCK_SEQUENCE_START_TOKEN = 7,
YAML_BLOCK_MAPPING_START_TOKEN = 8,
YAML_BLOCK_END_TOKEN = 9,
YAML_FLOW_SEQUENCE_START_TOKEN = 10,
YAML_FLOW_SEQUENCE_END_TOKEN = 11,
YAML_FLOW_MAPPING_START_TOKEN = 12,
YAML_FLOW_MAPPING_END_TOKEN = 13,
YAML_BLOCK_ENTRY_TOKEN = 14,
YAML_FLOW_ENTRY_TOKEN = 15,
YAML_KEY_TOKEN = 16,
YAML_VALUE_TOKEN = 17,
YAML_ALIAS_TOKEN = 18,
YAML_ANCHOR_TOKEN = 19,
YAML_TAG_TOKEN = 20,
YAML_SCALAR_TOKEN = 21,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_token_t {
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,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union unnamed_yaml_token_t_data {
pub stream_start: unnamed_yaml_token_t_data_stream_start,
pub alias: unnamed_yaml_token_t_data_alias,
pub anchor: unnamed_yaml_token_t_data_anchor,
pub tag: unnamed_yaml_token_t_data_tag,
pub scalar: unnamed_yaml_token_t_data_scalar,
pub version_directive: unnamed_yaml_token_t_data_version_directive,
pub tag_directive: unnamed_yaml_token_t_data_tag_directive,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_token_t_data_stream_start {
pub encoding: yaml_encoding_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_token_t_data_alias {
pub value: *mut yaml_char_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_token_t_data_anchor {
pub value: *mut yaml_char_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_token_t_data_tag {
pub handle: *mut yaml_char_t,
pub suffix: *mut yaml_char_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_token_t_data_scalar {
pub value: *mut yaml_char_t,
pub length: size_t,
pub style: yaml_scalar_style_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_token_t_data_version_directive {
pub major: libc::c_int,
pub minor: libc::c_int,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_token_t_data_tag_directive {
pub handle: *mut yaml_char_t,
pub prefix: *mut yaml_char_t,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_event_type_t {
YAML_NO_EVENT = 0,
YAML_STREAM_START_EVENT = 1,
YAML_STREAM_END_EVENT = 2,
YAML_DOCUMENT_START_EVENT = 3,
YAML_DOCUMENT_END_EVENT = 4,
YAML_ALIAS_EVENT = 5,
YAML_SCALAR_EVENT = 6,
YAML_SEQUENCE_START_EVENT = 7,
YAML_SEQUENCE_END_EVENT = 8,
YAML_MAPPING_START_EVENT = 9,
YAML_MAPPING_END_EVENT = 10,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_event_t {
pub type_: yaml_event_type_t,
pub data: unnamed_yaml_event_t_data,
pub start_mark: yaml_mark_t,
pub end_mark: yaml_mark_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union unnamed_yaml_event_t_data {
pub stream_start: unnamed_yaml_event_t_data_stream_start,
pub document_start: unnamed_yaml_event_t_data_document_start,
pub document_end: unnamed_yaml_event_t_data_document_end,
pub alias: unnamed_yaml_event_t_data_alias,
pub scalar: unnamed_yaml_event_t_data_scalar,
pub sequence_start: unnamed_yaml_event_t_data_sequence_start,
pub mapping_start: unnamed_yaml_event_t_data_mapping_start,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_event_t_data_stream_start {
pub encoding: yaml_encoding_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_event_t_data_document_start {
pub version_directive: *mut yaml_version_directive_t,
pub tag_directives: unnamed_yaml_event_t_data_document_start_tag_directives,
pub implicit: bool,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_event_t_data_document_start_tag_directives {
pub start: *mut yaml_tag_directive_t,
pub end: *mut yaml_tag_directive_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_event_t_data_document_end {
pub implicit: bool,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_event_t_data_alias {
pub anchor: *mut yaml_char_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_event_t_data_scalar {
pub anchor: *mut yaml_char_t,
pub tag: *mut yaml_char_t,
pub value: *mut yaml_char_t,
pub length: size_t,
pub plain_implicit: bool,
pub quoted_implicit: bool,
pub style: yaml_scalar_style_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_event_t_data_sequence_start {
pub anchor: *mut yaml_char_t,
pub tag: *mut yaml_char_t,
pub implicit: bool,
pub style: yaml_sequence_style_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_event_t_data_mapping_start {
pub anchor: *mut yaml_char_t,
pub tag: *mut yaml_char_t,
pub implicit: bool,
pub style: yaml_mapping_style_t,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_node_type_t {
YAML_NO_NODE = 0,
YAML_SCALAR_NODE = 1,
YAML_SEQUENCE_NODE = 2,
YAML_MAPPING_NODE = 3,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_node_t {
pub type_: yaml_node_type_t,
pub tag: *mut yaml_char_t,
pub data: unnamed_yaml_node_t_data,
pub start_mark: yaml_mark_t,
pub end_mark: yaml_mark_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union unnamed_yaml_node_t_data {
pub scalar: unnamed_yaml_node_t_data_scalar,
pub sequence: unnamed_yaml_node_t_data_sequence,
pub mapping: unnamed_yaml_node_t_data_mapping,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_node_t_data_scalar {
pub value: *mut yaml_char_t,
pub length: size_t,
pub style: yaml_scalar_style_t,
}
pub type yaml_node_item_t = libc::c_int;
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_node_t_data_sequence {
pub items: yaml_stack_t<yaml_node_item_t>,
pub style: yaml_sequence_style_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_node_t_data_mapping {
pub pairs: yaml_stack_t<yaml_node_pair_t>,
pub style: yaml_mapping_style_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_node_pair_t {
pub key: libc::c_int,
pub value: libc::c_int,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_document_t {
pub nodes: yaml_stack_t<yaml_node_t>,
pub version_directive: *mut yaml_version_directive_t,
pub tag_directives: unnamed_yaml_document_t_tag_directives,
pub start_implicit: bool,
pub end_implicit: bool,
pub start_mark: yaml_mark_t,
pub end_mark: yaml_mark_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct unnamed_yaml_document_t_tag_directives {
pub start: *mut yaml_tag_directive_t,
pub end: *mut yaml_tag_directive_t,
}
pub type yaml_read_handler_t = unsafe fn(
data: *mut libc::c_void,
buffer: *mut libc::c_uchar,
size: size_t,
size_read: *mut size_t,
) -> libc::c_int;
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_simple_key_t {
pub possible: bool,
pub required: bool,
pub token_number: size_t,
pub mark: yaml_mark_t,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_parser_state_t {
YAML_PARSE_STREAM_START_STATE = 0,
YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE = 1,
YAML_PARSE_DOCUMENT_START_STATE = 2,
YAML_PARSE_DOCUMENT_CONTENT_STATE = 3,
YAML_PARSE_DOCUMENT_END_STATE = 4,
YAML_PARSE_BLOCK_NODE_STATE = 5,
YAML_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE = 6,
YAML_PARSE_FLOW_NODE_STATE = 7,
YAML_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE = 8,
YAML_PARSE_BLOCK_SEQUENCE_ENTRY_STATE = 9,
YAML_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE = 10,
YAML_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE = 11,
YAML_PARSE_BLOCK_MAPPING_KEY_STATE = 12,
YAML_PARSE_BLOCK_MAPPING_VALUE_STATE = 13,
YAML_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE = 14,
YAML_PARSE_FLOW_SEQUENCE_ENTRY_STATE = 15,
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE = 16,
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE = 17,
YAML_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE = 18,
YAML_PARSE_FLOW_MAPPING_FIRST_KEY_STATE = 19,
YAML_PARSE_FLOW_MAPPING_KEY_STATE = 20,
YAML_PARSE_FLOW_MAPPING_VALUE_STATE = 21,
YAML_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE = 22,
YAML_PARSE_END_STATE = 23,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_alias_data_t {
pub anchor: *mut yaml_char_t,
pub index: libc::c_int,
pub mark: yaml_mark_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_parser_t {
#[cfg(doc)]
pub error: yaml_error_type_t,
#[cfg(not(doc))]
pub(crate) error: yaml_error_type_t,
#[cfg(doc)]
pub problem: *const libc::c_char,
#[cfg(not(doc))]
pub(crate) problem: *const libc::c_char,
#[cfg(doc)]
pub problem_offset: size_t,
#[cfg(not(doc))]
pub(crate) problem_offset: size_t,
#[cfg(doc)]
pub problem_value: libc::c_int,
#[cfg(not(doc))]
pub(crate) problem_value: libc::c_int,
#[cfg(doc)]
pub problem_mark: yaml_mark_t,
#[cfg(not(doc))]
pub(crate) problem_mark: yaml_mark_t,
#[cfg(doc)]
pub context: *const libc::c_char,
#[cfg(not(doc))]
pub(crate) context: *const libc::c_char,
#[cfg(doc)]
pub context_mark: yaml_mark_t,
#[cfg(not(doc))]
pub(crate) context_mark: yaml_mark_t,
pub(crate) read_handler: Option<yaml_read_handler_t>,
pub(crate) read_handler_data: *mut libc::c_void,
pub(crate) input: unnamed_yaml_parser_t_input,
pub(crate) eof: bool,
pub(crate) buffer: yaml_buffer_t<yaml_char_t>,
pub(crate) unread: size_t,
pub(crate) raw_buffer: yaml_buffer_t<libc::c_uchar>,
pub(crate) encoding: yaml_encoding_t,
pub(crate) offset: size_t,
pub(crate) mark: yaml_mark_t,
pub(crate) stream_start_produced: bool,
pub(crate) stream_end_produced: bool,
pub(crate) flow_level: libc::c_int,
pub(crate) tokens: yaml_queue_t<yaml_token_t>,
pub(crate) tokens_parsed: size_t,
pub(crate) token_available: bool,
pub(crate) indents: yaml_stack_t<libc::c_int>,
pub(crate) indent: libc::c_int,
pub(crate) simple_key_allowed: bool,
pub(crate) simple_keys: yaml_stack_t<yaml_simple_key_t>,
pub(crate) not_simple_keys: libc::c_int,
pub(crate) states: yaml_stack_t<yaml_parser_state_t>,
pub(crate) state: yaml_parser_state_t,
pub(crate) marks: yaml_stack_t<yaml_mark_t>,
pub(crate) tag_directives: yaml_stack_t<yaml_tag_directive_t>,
pub(crate) aliases: yaml_stack_t<yaml_alias_data_t>,
pub(crate) document: *mut yaml_document_t,
}
#[repr(C)]
#[non_exhaustive]
pub struct yaml_parser_t_prefix {
pub error: yaml_error_type_t,
pub problem: *const libc::c_char,
pub problem_offset: size_t,
pub problem_value: libc::c_int,
pub problem_mark: yaml_mark_t,
pub context: *const libc::c_char,
pub context_mark: yaml_mark_t,
}
#[doc(hidden)]
impl Deref for yaml_parser_t {
type Target = yaml_parser_t_prefix;
fn deref(&self) -> &Self::Target {
unsafe { &*addr_of!(*self).cast() }
}
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) union unnamed_yaml_parser_t_input {
pub string: unnamed_yaml_parser_t_input_string,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) struct unnamed_yaml_parser_t_input_string {
pub start: *const libc::c_uchar,
pub end: *const libc::c_uchar,
pub current: *const libc::c_uchar,
}
pub type yaml_write_handler_t =
unsafe fn(data: *mut libc::c_void, buffer: *mut libc::c_uchar, size: size_t) -> libc::c_int;
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[repr(u32)]
#[non_exhaustive]
pub enum yaml_emitter_state_t {
YAML_EMIT_STREAM_START_STATE = 0,
YAML_EMIT_FIRST_DOCUMENT_START_STATE = 1,
YAML_EMIT_DOCUMENT_START_STATE = 2,
YAML_EMIT_DOCUMENT_CONTENT_STATE = 3,
YAML_EMIT_DOCUMENT_END_STATE = 4,
YAML_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE = 5,
YAML_EMIT_FLOW_SEQUENCE_ITEM_STATE = 6,
YAML_EMIT_FLOW_MAPPING_FIRST_KEY_STATE = 7,
YAML_EMIT_FLOW_MAPPING_KEY_STATE = 8,
YAML_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE = 9,
YAML_EMIT_FLOW_MAPPING_VALUE_STATE = 10,
YAML_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE = 11,
YAML_EMIT_BLOCK_SEQUENCE_ITEM_STATE = 12,
YAML_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE = 13,
YAML_EMIT_BLOCK_MAPPING_KEY_STATE = 14,
YAML_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE = 15,
YAML_EMIT_BLOCK_MAPPING_VALUE_STATE = 16,
YAML_EMIT_END_STATE = 17,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) struct yaml_anchors_t {
pub references: libc::c_int,
pub anchor: libc::c_int,
pub serialized: bool,
}
#[derive(Copy, Clone)]
#[repr(C)]
#[non_exhaustive]
pub struct yaml_emitter_t {
#[cfg(doc)]
pub error: yaml_error_type_t,
#[cfg(not(doc))]
pub(crate) error: yaml_error_type_t,
#[cfg(doc)]
pub problem: *const libc::c_char,
#[cfg(not(doc))]
pub(crate) problem: *const libc::c_char,
pub(crate) write_handler: Option<yaml_write_handler_t>,
pub(crate) write_handler_data: *mut libc::c_void,
pub(crate) output: unnamed_yaml_emitter_t_output,
pub(crate) buffer: yaml_buffer_t<yaml_char_t>,
pub(crate) raw_buffer: yaml_buffer_t<libc::c_uchar>,
pub(crate) encoding: yaml_encoding_t,
pub(crate) canonical: bool,
pub(crate) best_indent: libc::c_int,
pub(crate) best_width: libc::c_int,
pub(crate) unicode: bool,
pub(crate) line_break: yaml_break_t,
pub(crate) states: yaml_stack_t<yaml_emitter_state_t>,
pub(crate) state: yaml_emitter_state_t,
pub(crate) events: yaml_queue_t<yaml_event_t>,
pub(crate) indents: yaml_stack_t<libc::c_int>,
pub(crate) tag_directives: yaml_stack_t<yaml_tag_directive_t>,
pub(crate) indent: libc::c_int,
pub(crate) flow_level: libc::c_int,
pub(crate) root_context: bool,
pub(crate) sequence_context: bool,
pub(crate) mapping_context: bool,
pub(crate) simple_key_context: bool,
pub(crate) line: libc::c_int,
pub(crate) column: libc::c_int,
pub(crate) whitespace: bool,
pub(crate) indention: bool,
pub(crate) open_ended: libc::c_int,
pub(crate) anchor_data: unnamed_yaml_emitter_t_anchor_data,
pub(crate) tag_data: unnamed_yaml_emitter_t_tag_data,
pub(crate) scalar_data: unnamed_yaml_emitter_t_scalar_data,
pub(crate) opened: bool,
pub(crate) closed: bool,
pub(crate) anchors: *mut yaml_anchors_t,
pub(crate) last_anchor_id: libc::c_int,
pub(crate) document: *mut yaml_document_t,
}
#[repr(C)]
#[non_exhaustive]
pub struct yaml_emitter_t_prefix {
pub error: yaml_error_type_t,
pub problem: *const libc::c_char,
}
#[doc(hidden)]
impl Deref for yaml_emitter_t {
type Target = yaml_emitter_t_prefix;
fn deref(&self) -> &Self::Target {
unsafe { &*addr_of!(*self).cast() }
}
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) union unnamed_yaml_emitter_t_output {
pub string: unnamed_yaml_emitter_t_output_string,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) struct unnamed_yaml_emitter_t_output_string {
pub buffer: *mut libc::c_uchar,
pub size: size_t,
pub size_written: *mut size_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) struct unnamed_yaml_emitter_t_anchor_data {
pub anchor: *mut yaml_char_t,
pub anchor_length: size_t,
pub alias: bool,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) struct unnamed_yaml_emitter_t_tag_data {
pub handle: *mut yaml_char_t,
pub handle_length: size_t,
pub suffix: *mut yaml_char_t,
pub suffix_length: size_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) struct unnamed_yaml_emitter_t_scalar_data {
pub value: *mut yaml_char_t,
pub length: size_t,
pub multiline: bool,
pub flow_plain_allowed: bool,
pub block_plain_allowed: bool,
pub single_quoted_allowed: bool,
pub block_allowed: bool,
pub style: yaml_scalar_style_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub(crate) struct yaml_string_t {
pub start: *mut yaml_char_t,
pub end: *mut yaml_char_t,
pub pointer: *mut yaml_char_t,
}
pub(crate) const NULL_STRING: yaml_string_t = yaml_string_t {
start: ptr::null_mut::<yaml_char_t>(),
end: ptr::null_mut::<yaml_char_t>(),
pointer: ptr::null_mut::<yaml_char_t>(),
};
#[repr(C)]
pub(crate) struct yaml_buffer_t<T> {
pub start: *mut T,
pub end: *mut T,
pub pointer: *mut T,
pub last: *mut T,
}
impl<T> Copy for yaml_buffer_t<T> {}
impl<T> Clone for yaml_buffer_t<T> {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
pub struct yaml_stack_t<T> {
pub start: *mut T,
pub end: *mut T,
pub top: *mut T,
}
impl<T> Copy for yaml_stack_t<T> {}
impl<T> Clone for yaml_stack_t<T> {
fn clone(&self) -> Self {
*self
}
}
#[repr(C)]
pub(crate) struct yaml_queue_t<T> {
pub start: *mut T,
pub end: *mut T,
pub head: *mut T,
pub tail: *mut T,
}
impl<T> Copy for yaml_queue_t<T> {}
impl<T> Clone for yaml_queue_t<T> {
fn clone(&self) -> Self {
*self
}
}