pub struct DataOutputStream<W: ?Sized> { /* private fields */ }
Expand description
A type that can serialize types according to LCS4
Implementations§
Source§impl<W> DataOutputStream<W>
impl<W> DataOutputStream<W>
Sourcepub const fn new(write: W, order: ByteOrder) -> Self
pub const fn new(write: W, order: ByteOrder) -> Self
Constructs a new DataOutputStream from the given underlying stream and byte order mode
Sourcepub const fn new_native(write: W) -> Self
pub const fn new_native(write: W) -> Self
Constructs a new DataOutputStream from the given underlying stream and the native byte order mode
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
unwraps the DataOutputStream into the inner stream
Trait Implementations§
Source§impl<W: Write + ?Sized> DataOutput for DataOutputStream<W>
impl<W: Write + ?Sized> DataOutput for DataOutputStream<W>
Source§fn byte_order(&self) -> ByteOrder
fn byte_order(&self) -> ByteOrder
Returns the byte order mode for the stream
Source§fn set_byte_order(&mut self, order: ByteOrder)
fn set_byte_order(&mut self, order: ByteOrder)
Sets the byte order mode on the stream
Source§impl<W: Write + Seek + ?Sized> Seek for DataOutputStream<W>
impl<W: Write + Seek + ?Sized> Seek for DataOutputStream<W>
Source§fn seek(&mut self, pos: SeekFrom) -> Result<u64>
fn seek(&mut self, pos: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · Source§fn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
Source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
🔬This is a nightly-only experimental API. (
seek_stream_len
)Returns the length of this stream (in bytes). Read more
Source§impl<W: Write + ?Sized> Write for DataOutputStream<W>
impl<W: Write + ?Sized> Write for DataOutputStream<W>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<W> Freeze for DataOutputStream<W>
impl<W> RefUnwindSafe for DataOutputStream<W>where
W: RefUnwindSafe + ?Sized,
impl<W> Send for DataOutputStream<W>
impl<W> Sync for DataOutputStream<W>
impl<W> Unpin for DataOutputStream<W>
impl<W> UnwindSafe for DataOutputStream<W>where
W: UnwindSafe + ?Sized,
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