#[repr(C)]pub struct rb_io_t {Show 21 fields
pub self_: VALUE,
pub stdio_file: *mut FILE,
pub fd: c_int,
pub mode: c_int,
pub pid: pid_t,
pub lineno: c_int,
pub pathv: VALUE,
pub finalize: Option<unsafe extern "C" fn(arg1: *mut rb_io_t, arg2: c_int)>,
pub wbuf: rb_io_buffer_t,
pub rbuf: rb_io_buffer_t,
pub tied_io_for_writing: VALUE,
pub encs: rb_io_enc_t,
pub readconv: *mut rb_econv_t,
pub cbuf: rb_io_buffer_t,
pub writeconv: *mut rb_econv_t,
pub writeconv_asciicompat: VALUE,
pub writeconv_initialized: c_int,
pub writeconv_pre_ecflags: c_int,
pub writeconv_pre_ecopts: VALUE,
pub write_lock: VALUE,
pub timeout: VALUE,
}Expand description
Fields§
§self_: VALUE§stdio_file: *mut FILE§fd: c_int§mode: c_int§pid: pid_t§lineno: c_int§pathv: VALUE§finalize: Option<unsafe extern "C" fn(arg1: *mut rb_io_t, arg2: c_int)>§wbuf: rb_io_buffer_t§rbuf: rb_io_buffer_t§(Byte) read buffer. Note also that there is a field called
::rb_io_t::cbuf, which also concerns read IO.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
tied_io_for_writing: VALUEDuplex IO object, if set.
§@see rb_io_set_write_io
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
encs: rb_io_enc_t§readconv: *mut rb_econv_t§Encoding converter used when reading from this IO.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
cbuf: rb_io_buffer_t§rb_io_ungetc destination. This buffer is read before checking
::rb_io_t::rbuf
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
writeconv: *mut rb_econv_t§Encoding converter used when writing to this IO.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
writeconv_asciicompat: VALUE§This is, when set, an instance of ::rb_cString which holds the “common”
encoding. Write conversion can convert strings twice… In case
conversion from encoding X to encoding Y does not exist, Ruby finds an
encoding Z that bridges the two, so that X to Z to Y conversion happens.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
writeconv_initialized: c_int§Whether ::rb_io_t::writeconv is already set up.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
writeconv_pre_ecflags: c_int§Value of ::rb_io_t::rb_io_enc_t::ecflags stored right before
initialising ::rb_io_t::writeconv.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
writeconv_pre_ecopts: VALUE§Value of ::rb_io_t::rb_io_enc_t::ecopts stored right before initialising
::rb_io_t::writeconv.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
write_lock: VALUEThis is a Ruby level mutex. It avoids multiple threads to write to an
IO at once; helps for instance rb_io_puts to ensure newlines right
next to its arguments.
§This of course doesn’t help inter-process IO interleaves, though.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3
timeout: VALUE§The timeout associated with this IO when performing blocking operations.
Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3