pub struct FixedString<const N: usize>(/* private fields */);Expand description
A fixed-width array of bytes representing an ASCII string.
The bytes default to all zeros, but this string may not necessarily
terminate with a '\0' if all bytes are used.
Implementations§
Trait Implementations§
Source§impl<const N: usize> BinRead for FixedString<N>
impl<const N: usize> BinRead for FixedString<N>
Source§fn read_options<R: Read + Seek>(
reader: &mut R,
endian: Endian,
_args: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( reader: &mut R, endian: Endian, _args: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T from the reader assuming native-endian byte order. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl<const N: usize> BinWrite for FixedString<N>
impl<const N: usize> BinWrite for FixedString<N>
Source§fn write_options<W: Write + Seek>(
&self,
writer: &mut W,
endian: Endian,
_args: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, writer: &mut W, endian: Endian, _args: Self::Args<'_>, ) -> BinResult<()>
Source§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming native-endian byte order. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Write
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl<const N: usize> Default for FixedString<N>
impl<const N: usize> Default for FixedString<N>
Source§impl<const N: usize> Display for FixedString<N>
impl<const N: usize> Display for FixedString<N>
Source§impl<const N: usize> From<FixedString<N>> for String
impl<const N: usize> From<FixedString<N>> for String
Source§fn from(FixedString: FixedString<N>) -> Self
fn from(FixedString: FixedString<N>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<const N: usize> Freeze for FixedString<N>
impl<const N: usize> RefUnwindSafe for FixedString<N>
impl<const N: usize> Send for FixedString<N>
impl<const N: usize> Sync for FixedString<N>
impl<const N: usize> Unpin for FixedString<N>
impl<const N: usize> UnsafeUnpin for FixedString<N>
impl<const N: usize> UnwindSafe for FixedString<N>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().