Struct symphonia_core::io::MonitorStream
source · pub struct MonitorStream<B: ReadBytes, M: Monitor> { /* private fields */ }
Expand description
A MonitorStream
is a passive stream that observes all operations performed on the inner
stream and forwards an immutable reference of the result to a Monitor
.
Implementations§
source§impl<B: ReadBytes, M: Monitor> MonitorStream<B, M>
impl<B: ReadBytes, M: Monitor> MonitorStream<B, M>
Trait Implementations§
source§impl<B: ReadBytes, M: Monitor> ReadBytes for MonitorStream<B, M>
impl<B: ReadBytes, M: Monitor> ReadBytes for MonitorStream<B, M>
source§fn read_byte(&mut self) -> Result<u8>
fn read_byte(&mut self) -> Result<u8>
Reads a single byte from the stream and returns it or an error.
source§fn read_double_bytes(&mut self) -> Result<[u8; 2]>
fn read_double_bytes(&mut self) -> Result<[u8; 2]>
Reads two bytes from the stream and returns them in read-order or an error.
source§fn read_triple_bytes(&mut self) -> Result<[u8; 3]>
fn read_triple_bytes(&mut self) -> Result<[u8; 3]>
Reads three bytes from the stream and returns them in read-order or an error.
source§fn read_quad_bytes(&mut self) -> Result<[u8; 4]>
fn read_quad_bytes(&mut self) -> Result<[u8; 4]>
Reads four bytes from the stream and returns them in read-order or an error.
source§fn read_buf(&mut self, buf: &mut [u8]) -> Result<usize>
fn read_buf(&mut self, buf: &mut [u8]) -> Result<usize>
Reads up-to the number of bytes required to fill buf or returns an error.
source§fn read_buf_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_buf_exact(&mut self, buf: &mut [u8]) -> Result<()>
Reads exactly the number of bytes required to fill be provided buffer or returns an error.
source§fn scan_bytes_aligned<'a>(
&mut self,
pattern: &[u8],
align: usize,
buf: &'a mut [u8],
) -> Result<&'a mut [u8]>
fn scan_bytes_aligned<'a>( &mut self, pattern: &[u8], align: usize, buf: &'a mut [u8], ) -> Result<&'a mut [u8]>
Reads bytes from a stream into a supplied buffer until a byte patter is matched on an
aligned byte boundary. Returns a mutable slice to the valid region of the provided buffer.
source§fn ignore_bytes(&mut self, count: u64) -> Result<()>
fn ignore_bytes(&mut self, count: u64) -> Result<()>
Ignores the specified number of bytes from the stream or returns an error.
source§fn read_u8(&mut self) -> Result<u8>
fn read_u8(&mut self) -> Result<u8>
Reads a single unsigned byte from the stream and returns it or an error.
source§fn read_i8(&mut self) -> Result<i8>
fn read_i8(&mut self) -> Result<i8>
Reads a single signed byte from the stream and returns it or an error.
source§fn read_u16(&mut self) -> Result<u16>
fn read_u16(&mut self) -> Result<u16>
Reads two bytes from the stream and interprets them as an unsigned 16-bit little-endian
integer or returns an error.
source§fn read_i16(&mut self) -> Result<i16>
fn read_i16(&mut self) -> Result<i16>
Reads two bytes from the stream and interprets them as an signed 16-bit little-endian
integer or returns an error.
source§fn read_be_u16(&mut self) -> Result<u16>
fn read_be_u16(&mut self) -> Result<u16>
Reads two bytes from the stream and interprets them as an unsigned 16-bit big-endian
integer or returns an error.
source§fn read_be_i16(&mut self) -> Result<i16>
fn read_be_i16(&mut self) -> Result<i16>
Reads two bytes from the stream and interprets them as an signed 16-bit big-endian
integer or returns an error.
source§fn read_u24(&mut self) -> Result<u32>
fn read_u24(&mut self) -> Result<u32>
Reads three bytes from the stream and interprets them as an unsigned 24-bit little-endian
integer or returns an error.
source§fn read_i24(&mut self) -> Result<i32>
fn read_i24(&mut self) -> Result<i32>
Reads three bytes from the stream and interprets them as an signed 24-bit little-endian
integer or returns an error.
source§fn read_be_u24(&mut self) -> Result<u32>
fn read_be_u24(&mut self) -> Result<u32>
Reads three bytes from the stream and interprets them as an unsigned 24-bit big-endian
integer or returns an error.
source§fn read_be_i24(&mut self) -> Result<i32>
fn read_be_i24(&mut self) -> Result<i32>
Reads three bytes from the stream and interprets them as an signed 24-bit big-endian
integer or returns an error.
source§fn read_u32(&mut self) -> Result<u32>
fn read_u32(&mut self) -> Result<u32>
Reads four bytes from the stream and interprets them as an unsigned 32-bit little-endian
integer or returns an error.
source§fn read_i32(&mut self) -> Result<i32>
fn read_i32(&mut self) -> Result<i32>
Reads four bytes from the stream and interprets them as an signed 32-bit little-endian
integer or returns an error.
source§fn read_be_u32(&mut self) -> Result<u32>
fn read_be_u32(&mut self) -> Result<u32>
Reads four bytes from the stream and interprets them as an unsigned 32-bit big-endian
integer or returns an error.
source§fn read_be_i32(&mut self) -> Result<i32>
fn read_be_i32(&mut self) -> Result<i32>
Reads four bytes from the stream and interprets them as a signed 32-bit big-endian
integer or returns an error.
source§fn read_u64(&mut self) -> Result<u64>
fn read_u64(&mut self) -> Result<u64>
Reads eight bytes from the stream and interprets them as an unsigned 64-bit little-endian
integer or returns an error.
source§fn read_i64(&mut self) -> Result<i64>
fn read_i64(&mut self) -> Result<i64>
Reads eight bytes from the stream and interprets them as an signed 64-bit little-endian
integer or returns an error.
source§fn read_be_u64(&mut self) -> Result<u64>
fn read_be_u64(&mut self) -> Result<u64>
Reads eight bytes from the stream and interprets them as an unsigned 64-bit big-endian
integer or returns an error.
source§fn read_be_i64(&mut self) -> Result<i64>
fn read_be_i64(&mut self) -> Result<i64>
Reads eight bytes from the stream and interprets them as an signed 64-bit big-endian
integer or returns an error.
source§fn read_f32(&mut self) -> Result<f32>
fn read_f32(&mut self) -> Result<f32>
Reads four bytes from the stream and interprets them as a 32-bit little-endian IEEE-754
floating-point value.
source§fn read_be_f32(&mut self) -> Result<f32>
fn read_be_f32(&mut self) -> Result<f32>
Reads four bytes from the stream and interprets them as a 32-bit big-endian IEEE-754
floating-point value.
source§fn read_f64(&mut self) -> Result<f64>
fn read_f64(&mut self) -> Result<f64>
Reads four bytes from the stream and interprets them as a 64-bit little-endian IEEE-754
floating-point value.
source§fn read_be_f64(&mut self) -> Result<f64>
fn read_be_f64(&mut self) -> Result<f64>
Reads four bytes from the stream and interprets them as a 64-bit big-endian IEEE-754
floating-point value.
source§fn read_boxed_slice(&mut self, len: usize) -> Result<Box<[u8]>>
fn read_boxed_slice(&mut self, len: usize) -> Result<Box<[u8]>>
Reads up-to the number of bytes requested, and returns a boxed slice of the data or an
error.
Auto Trait Implementations§
impl<B, M> Freeze for MonitorStream<B, M>
impl<B, M> RefUnwindSafe for MonitorStream<B, M>where
B: RefUnwindSafe,
M: RefUnwindSafe,
impl<B, M> Send for MonitorStream<B, M>
impl<B, M> Sync for MonitorStream<B, M>
impl<B, M> Unpin for MonitorStream<B, M>
impl<B, M> UnwindSafe for MonitorStream<B, M>where
B: UnwindSafe,
M: UnwindSafe,
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