Enum speedy::Endianness
source · pub enum Endianness {
LittleEndian,
BigEndian,
}
Variants§
Implementations§
source§impl Endianness
impl Endianness
pub const NATIVE: Endianness = Endianness::LittleEndian
source§impl Endianness
impl Endianness
pub fn conversion_necessary(self) -> bool
pub fn swap_slice_u8(self, _: &mut [u8])
pub fn swap_slice_i8(self, _: &mut [i8])
source§impl Endianness
impl Endianness
source§impl Endianness
impl Endianness
source§impl Endianness
impl Endianness
source§impl Endianness
impl Endianness
source§impl Endianness
impl Endianness
source§impl Endianness
impl Endianness
source§impl Endianness
impl Endianness
source§impl Endianness
impl Endianness
source§impl Endianness
impl Endianness
Trait Implementations§
source§impl Clone for Endianness
impl Clone for Endianness
source§fn clone(&self) -> Endianness
fn clone(&self) -> Endianness
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Context for Endianness
impl Context for Endianness
type Error = Error
fn endianness(&self) -> Endianness
source§impl Debug for Endianness
impl Debug for Endianness
source§impl Ord for Endianness
impl Ord for Endianness
source§fn cmp(&self, other: &Endianness) -> Ordering
fn cmp(&self, other: &Endianness) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Endianness
impl PartialEq for Endianness
source§fn eq(&self, other: &Endianness) -> bool
fn eq(&self, other: &Endianness) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Endianness
impl PartialOrd for Endianness
source§fn partial_cmp(&self, other: &Endianness) -> Option<Ordering>
fn partial_cmp(&self, other: &Endianness) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a, C: Context> Readable<'a, C> for Endianness
impl<'a, C: Context> Readable<'a, C> for Endianness
fn read_from<R: Reader<'a, C>>(reader: &mut R) -> Result<Self, C::Error>
fn minimum_bytes_needed() -> usize
fn read_from_buffer_with_ctx( context: C, buffer: &'a [u8] ) -> Result<Self, C::Error>
fn read_with_length_from_buffer_with_ctx( context: C, buffer: &'a [u8] ) -> (Result<Self, C::Error>, usize)
fn read_from_buffer_copying_data_with_ctx( context: C, buffer: &[u8] ) -> Result<Self, C::Error>
fn read_with_length_from_buffer_copying_data_with_ctx( context: C, buffer: &[u8] ) -> (Result<Self, C::Error>, usize)
fn read_with_length_from_buffer_copying_data_with_ctx_mut( context: &mut C, buffer: &[u8] ) -> (Result<Self, C::Error>, usize)
fn read_from_stream_unbuffered_with_ctx<S: Read>( context: C, stream: S ) -> Result<Self, C::Error>
fn read_from_stream_buffered_with_ctx<S: Read>( context: C, stream: S ) -> Result<Self, C::Error>
fn read_from_file_with_ctx( context: C, path: impl AsRef<Path> ) -> Result<Self, C::Error>
source§impl<C: Context> Writable<C> for Endianness
impl<C: Context> Writable<C> for Endianness
fn write_to<T: ?Sized + Writer<C>>( &self, writer: &mut T ) -> Result<(), C::Error>
fn bytes_needed(&self) -> Result<usize, C::Error>
fn write_to_buffer_with_ctx( &self, context: C, buffer: &mut [u8] ) -> Result<(), C::Error>
fn write_to_buffer_with_ctx_mut( &self, context: &mut C, buffer: &mut [u8] ) -> Result<(), C::Error>
fn write_to_vec_with_ctx(&self, context: C) -> Result<Vec<u8>, C::Error>
fn write_to_vec_with_ctx_mut( &self, context: &mut C ) -> Result<Vec<u8>, C::Error>
fn write_to_stream_with_ctx<S: Write>( &self, context: C, stream: S ) -> Result<(), C::Error>
fn write_to_file_with_ctx( &self, context: C, path: impl AsRef<Path> ) -> Result<(), C::Error>
impl Copy for Endianness
impl Eq for Endianness
impl StructuralEq for Endianness
impl StructuralPartialEq for Endianness
Auto Trait Implementations§
impl RefUnwindSafe for Endianness
impl Send for Endianness
impl Sync for Endianness
impl Unpin for Endianness
impl UnwindSafe for Endianness
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