Enum speedy::Endianness
source · [−]pub enum Endianness {
LittleEndian,
BigEndian,
}
Variants
LittleEndian
BigEndian
Implementations
sourceimpl Endianness
impl Endianness
pub const NATIVE: Endianness = Endianness::LittleEndian
sourceimpl 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])
sourceimpl Endianness
impl Endianness
sourceimpl Endianness
impl Endianness
sourceimpl Endianness
impl Endianness
sourceimpl Endianness
impl Endianness
sourceimpl Endianness
impl Endianness
sourceimpl Endianness
impl Endianness
sourceimpl Endianness
impl Endianness
sourceimpl Endianness
impl Endianness
sourceimpl Endianness
impl Endianness
Trait Implementations
sourceimpl Clone for Endianness
impl Clone for Endianness
sourcefn clone(&self) -> Endianness
fn clone(&self) -> Endianness
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Context for Endianness
impl Context for Endianness
type Error = Error
fn endianness(&self) -> Endianness
sourceimpl Debug for Endianness
impl Debug for Endianness
sourceimpl Ord for Endianness
impl Ord for Endianness
sourceimpl PartialEq<Endianness> for Endianness
impl PartialEq<Endianness> for Endianness
sourceimpl PartialOrd<Endianness> for Endianness
impl PartialOrd<Endianness> for Endianness
sourcefn partial_cmp(&self, other: &Endianness) -> Option<Ordering>
fn partial_cmp(&self, other: &Endianness) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl<'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
sourcefn read_from_buffer(buffer: &'a [u8]) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
fn read_from_buffer(buffer: &'a [u8]) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
Deserializes from a given buffer. Read more
sourcefn read_with_length_from_buffer(
buffer: &'a [u8]
) -> (Result<Self, C::Error>, usize) where
Self: DefaultContext<Context = C>,
C: Default,
fn read_with_length_from_buffer(
buffer: &'a [u8]
) -> (Result<Self, C::Error>, usize) where
Self: DefaultContext<Context = C>,
C: Default,
Deserializes from a given buffer while also returning the amount of bytes consumed. Read more
sourcefn read_from_buffer_copying_data(buffer: &[u8]) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
fn read_from_buffer_copying_data(buffer: &[u8]) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
Deserializes from a given buffer. Read more
sourcefn read_with_length_from_buffer_copying_data(
buffer: &[u8]
) -> (Result<Self, C::Error>, usize) where
Self: DefaultContext<Context = C>,
C: Default,
fn read_with_length_from_buffer_copying_data(
buffer: &[u8]
) -> (Result<Self, C::Error>, usize) where
Self: DefaultContext<Context = C>,
C: Default,
Deserializes from a given buffer while also returning the amount of bytes consumed. Read more
sourcefn read_from_stream_unbuffered(stream: impl Read) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
fn read_from_stream_unbuffered(stream: impl Read) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
Reads from a given stream without any buffering. Read more
sourcefn read_from_stream_buffered(stream: impl Read) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
fn read_from_stream_buffered(stream: impl Read) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
Reads from a given stream with internal buffering. Read more
fn read_from_file(path: impl AsRef<Path>) -> Result<Self, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
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>
sourceimpl<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(&self, buffer: &mut [u8]) -> Result<(), C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
fn write_to_vec(&self) -> Result<Vec<u8>, C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
fn write_to_stream<S: Write>(&self, stream: S) -> Result<(), C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
fn write_to_file(&self, path: impl AsRef<Path>) -> Result<(), C::Error> where
Self: DefaultContext<Context = C>,
C: Default,
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more