Type Alias exr::compression::Bytes
source · pub type Bytes<'s> = &'s [u8];Expand description
A byte slice.
Trait Implementations§
1.0.0 · source§impl BufRead for &[u8]
impl BufRead for &[u8]
source§fn fill_buf(&mut self) -> Result<&[u8], Error>
fn fill_buf(&mut self) -> Result<&[u8], Error>
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, amt: usize)
fn consume(&mut self, amt: 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 has_data_left(&mut self) -> Result<bool, Error>
fn has_data_left(&mut self) -> Result<bool, Error>
🔬This is a nightly-only experimental API. (
buf_read_has_data_left)Check if the underlying
Read has any data left to be read. Read more1.0.0 · source§fn read_until(
&mut self,
byte: u8,
buf: &mut Vec<u8, Global>
) -> Result<usize, Error>
fn read_until( &mut self, byte: u8, buf: &mut Vec<u8, Global> ) -> Result<usize, Error>
1.0.0 · source§fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
Read all bytes until a newline (the
0xA byte) is reached, and append
them to the provided String buffer. Read more1.0.0 · source§impl<'a, T> IntoIterator for &'a [T]
impl<'a, T> IntoIterator for &'a [T]
1.46.0 · source§impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where
A: Allocator,
T: PartialEq<U>,
impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where A: Allocator, T: PartialEq<U>,
1.0.0 · source§impl Read for &[u8]
impl Read for &[u8]
Read is implemented for &[u8] by copying from the slice.
Note that reading updates the slice to point to the yet unread part. The slice will be empty when EOF is reached.
source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
Pull some bytes from this source into the specified buffer, returning
how many bytes were read. Read more
source§fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf)Pull some bytes from this source into the specified buffer. Read more
source§fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
Like
read, except that it reads into a slice of buffers. Read moresource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Read the exact number of bytes required to fill
buf. Read moresource§fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
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, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
Read all bytes until EOF in this source, appending them to
buf. Read moresource§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf)Read the exact number of bytes required to fill
cursor. Read more1.0.0 · source§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<R> ReadEndian<[f32]> for Rwhere
R: Read,
impl<R> ReadEndian<[f32]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [f32]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [f32] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[f64]> for Rwhere
R: Read,
impl<R> ReadEndian<[f64]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [f64]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [f64] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[i128]> for Rwhere
R: Read,
impl<R> ReadEndian<[i128]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [i128]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [i128] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[i16]> for Rwhere
R: Read,
impl<R> ReadEndian<[i16]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [i16]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [i16] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[i32]> for Rwhere
R: Read,
impl<R> ReadEndian<[i32]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [i32]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [i32] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[i64]> for Rwhere
R: Read,
impl<R> ReadEndian<[i64]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [i64]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [i64] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[i8]> for Rwhere
R: Read,
impl<R> ReadEndian<[i8]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [i8]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [i8] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[u128]> for Rwhere
R: Read,
impl<R> ReadEndian<[u128]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [u128]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [u128] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[u16]> for Rwhere
R: Read,
impl<R> ReadEndian<[u16]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [u16]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [u16] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[u32]> for Rwhere
R: Read,
impl<R> ReadEndian<[u32]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [u32]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [u32] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[u64]> for Rwhere
R: Read,
impl<R> ReadEndian<[u64]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [u64]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [u64] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<R> ReadEndian<[u8]> for Rwhere
R: Read,
impl<R> ReadEndian<[u8]> for Rwhere R: Read,
source§fn read_from_little_endian_into(
&mut self,
value: &mut [u8]
) -> Result<(), Error>
fn read_from_little_endian_into( &mut self, value: &mut [u8] ) -> Result<(), Error>
Read into the supplied reference. Acts the same as
std::io::Read::read_exact.source§impl<T> ValidateResult for &[T]where
T: ValidateResult,
impl<T> ValidateResult for &[T]where T: ValidateResult,
source§fn validate_result(
&self,
other: &Self,
options: ValidationOptions,
location: impl Fn() -> String
) -> ValidationResult
fn validate_result( &self, other: &Self, options: ValidationOptions, location: impl Fn() -> String ) -> ValidationResult
Compare self with the other.
Exceptional behaviour: Read more
source§fn assert_equals_result(&self, result: &Self)
fn assert_equals_result(&self, result: &Self)
Compare self with the other. Panics if not equal. Read more
source§impl<W> WriteEndian<[f32]> for Wwhere
W: Write,
impl<W> WriteEndian<[f32]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[f32]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[f32]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[f64]> for Wwhere
W: Write,
impl<W> WriteEndian<[f64]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[f64]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[f64]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[i128]> for Wwhere
W: Write,
impl<W> WriteEndian<[i128]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[i128]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[i128]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[i16]> for Wwhere
W: Write,
impl<W> WriteEndian<[i16]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[i16]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[i16]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[i32]> for Wwhere
W: Write,
impl<W> WriteEndian<[i32]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[i32]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[i32]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[i64]> for Wwhere
W: Write,
impl<W> WriteEndian<[i64]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[i64]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[i64]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[i8]> for Wwhere
W: Write,
impl<W> WriteEndian<[i8]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[i8]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[i8]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[u128]> for Wwhere
W: Write,
impl<W> WriteEndian<[u128]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[u128]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[u128]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[u16]> for Wwhere
W: Write,
impl<W> WriteEndian<[u16]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[u16]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[u16]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[u32]> for Wwhere
W: Write,
impl<W> WriteEndian<[u32]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[u32]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[u32]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[u64]> for Wwhere
W: Write,
impl<W> WriteEndian<[u64]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[u64]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[u64]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness
source§impl<W> WriteEndian<[u8]> for Wwhere
W: Write,
impl<W> WriteEndian<[u8]> for Wwhere W: Write,
source§fn write_as_little_endian(&mut self, value: &[u8]) -> Result<(), Error>
fn write_as_little_endian(&mut self, value: &[u8]) -> Result<(), Error>
Write the byte value of the specified reference, converting it to little endianness