[−][src]Struct bitstream_io::write::ByteWriter
For writing aligned bytes to a stream of bytes in a given endianness.
This only writes aligned values and maintains no internal state.
Implementations
impl<W: Write, E: Endianness> ByteWriter<W, E>[src]
pub fn new(writer: W) -> ByteWriter<W, E>[src]
Wraps a ByteWriter around something that implements Write
pub fn endian(writer: W, _endian: E) -> ByteWriter<W, E>[src]
Wraps a BitWriter around something that implements Write
with the given endianness.
pub fn into_writer(self) -> W[src]
Unwraps internal writer and disposes of ByteWriter.
Any unwritten partial bits are discarded.
pub fn writer(&mut self) -> &mut W[src]
Provides mutable reference to internal writer.
pub fn into_bitwriter(self) -> BitWriter<W, E>[src]
Converts ByteWriter to BitWriter in the same endianness.
pub fn bitwriter(&mut self) -> BitWriter<&mut W, E>[src]
Provides temporary BitWriter in the same endianness.
Warning
Any unwritten bits left over when BitWriter is dropped are lost.
Trait Implementations
impl<W: Write, E: Endianness> ByteWrite for ByteWriter<W, E>[src]
Auto Trait Implementations
impl<W, E> RefUnwindSafe for ByteWriter<W, E> where
E: RefUnwindSafe,
W: RefUnwindSafe, [src]
E: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, E> Send for ByteWriter<W, E> where
E: Send,
W: Send, [src]
E: Send,
W: Send,
impl<W, E> Sync for ByteWriter<W, E> where
E: Sync,
W: Sync, [src]
E: Sync,
W: Sync,
impl<W, E> Unpin for ByteWriter<W, E> where
E: Unpin,
W: Unpin, [src]
E: Unpin,
W: Unpin,
impl<W, E> UnwindSafe for ByteWriter<W, E> where
E: UnwindSafe,
W: UnwindSafe, [src]
E: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,