pub struct FILE { /* private fields */ }Expand description
This struct gets exposed to the C API.
Implementations§
Source§impl FILE
impl FILE
pub fn lock(&mut self) -> LockGuard<'_>
pub fn try_set_orientation(&mut self, mode: c_int) -> c_int
pub fn try_set_orientation_unlocked(&mut self, mode: c_int) -> c_int
pub fn try_set_byte_orientation_unlocked(&mut self) -> Result<(), c_int>
pub fn try_set_wide_orientation_unlocked(&mut self) -> Result<(), c_int>
pub fn purge(&mut self)
Trait Implementations§
Source§impl BufRead for FILE
impl BufRead for FILE
Source§fn fill_buf(&mut self) -> Result<&[u8]>
fn fill_buf(&mut self) -> Result<&[u8]>
Returns the contents of the internal buffer, filling it with more data
from the inner reader if it is empty. Read more
Source§fn consume(&mut self, i: usize)
fn consume(&mut self, i: usize)
Tells this buffer that
amt bytes have been consumed from the buffer,
so they should no longer be returned in calls to read. Read moreSource§fn read_line(&mut self, buf: &mut String) -> Result<usize>
fn read_line(&mut self, buf: &mut String) -> Result<usize>
Read all bytes until a newline (the 0xA byte) is reached, and append
them to the provided buffer. Read more
Source§impl Read for FILE
impl Read for FILE
Source§fn read(&mut self, out: &mut [u8]) -> Result<usize>
fn read(&mut self, out: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning
how many bytes were read. Read more
fn read_out(&mut self, out: Out<'_, [u8]>) -> Result<usize>
Source§unsafe fn initializer(&self) -> Initializer
unsafe fn initializer(&self) -> Initializer
Determines if this
Reader can work with buffers of uninitialized
memory. Read moreSource§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
Read all bytes until EOF in this source, placing them into
buf. Read moreSource§fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize>
Read all bytes until EOF in this source, appending them to
buf. Read moreSource§fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Read the exact number of bytes required to fill
buf. Read moreSource§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Creates a “by reference” adaptor for this instance of
Read. Read moreSource§impl Write for FILE
impl Write for FILE
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this object, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn write_all(&mut self, buf: &[u8]) -> Result<()>
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this write. Read more
Auto Trait Implementations§
impl !Freeze for FILE
impl !RefUnwindSafe for FILE
impl Send for FILE
impl !Sync for FILE
impl Unpin for FILE
impl UnsafeUnpin for FILE
impl !UnwindSafe for FILE
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more