Modules§
- byte_
slice - Traits for types that encapsulate a
[u8]. - byteorder
- Byte order-aware numeric primitives.
- error
- Types related to error reporting.
Macros§
- include_
value - Includes a file and safely transmutes it to a value of an arbitrary type.
- transmute
- Safely transmutes a value of one type to a value of another type of the same size.
- transmute_
mut - Safely transmutes a mutable reference of one type to a mutable reference of another type of the same size and compatible alignment.
- transmute_
ref - Safely transmutes a mutable or immutable reference of one type to an immutable reference of another type of the same size and compatible alignment.
- try_
transmute - Conditionally transmutes a value of one type to a value of another type of the same size.
- try_
transmute_ mut - Conditionally transmutes a mutable reference of one type to a mutable reference of another type of the same size and compatible alignment.
- try_
transmute_ ref - Conditionally transmutes a mutable or immutable reference of one type to an immutable reference of another type of the same size and compatible alignment.
Structs§
- Alignment
Error - The error emitted if the conversion source is improperly aligned.
- Alloc
Error - The error type of a failed allocation.
- F32
- A 32-bit floating point number stored in a given byte order.
- F64
- A 64-bit floating point number stored in a given byte order.
- I16
- I32
- I64
- I128
- Isize
- A word-sized signed integer stored in a given byte order.
- Ptr
- A raw pointer with more restrictions.
- Ref
- A typed reference derived from a byte slice.
- Size
Error - The error emitted if the conversion source is of incorrect size.
- Split
- A
Tthat has been split into two possibly-overlapping parts. - U16
- U32
- U64
- U128
- Unalign
- A type with no alignment requirement.
- Usize
- A word-sized unsigned integer stored in a given byte order.
- Validity
Error - The error emitted if the conversion source contains invalid data.
Enums§
- BigEndian
- Big-endian byte order.
- Convert
Error - Zerocopy’s generic error type.
- Little
Endian - Little-endian byte order.
Traits§
- Byte
Order - A type-level representation of byte order.
- Byte
Slice - A mutable or immutable reference to a byte slice.
- Byte
Slice Mut - A mutable reference to a byte slice.
- Cloneable
Byte Slice - A
ByteSlicewhich can be cloned without violating dereference stability. - Copyable
Byte Slice - A
ByteSlicewhich can be copied without violating dereference stability. - From
Bytes - Types for which any bit pattern is valid.
- From
Zeros - Types for which a sequence of
0bytes is a valid instance. - Immutable
- Types which are free from interior mutability.
- Into
Byte Slice - A
ByteSlicethat conveys no ownership, and so can be converted into a byte slice. - Into
Byte Slice Mut - A
ByteSliceMutthat conveys no ownership, and so can be converted into a mutable byte slice. - Into
Bytes - Types that can be converted to an immutable slice of initialized bytes.
- Known
Layout - Indicates that zerocopy can reason about certain aspects of a type’s layout.
- SplitAt
- Types that can be split in two.
- Split
Byte Slice - A
ByteSlicethat can be split in two. - Split
Byte Slice Mut - A shorthand for
SplitByteSliceandByteSliceMut. - TryFrom
Bytes - Types for which some bit patterns are valid.
- Unaligned
- Types with no alignment requirement.
Type Aliases§
- Aligned
TryCast Error - The error type of well-aligned, fallible casts.
- BE
- A type alias for
BigEndian. - Cast
Error - The error type of reference conversions.
- LE
- A type alias for
LittleEndian. - Maybe
- A shorthand for a maybe-valid, maybe-aligned reference. Used as the argument
to
TryFromBytes::is_bit_valid. - Native
Endian - The endianness used by this platform.
- Network
Endian - The endianness used in many network protocols.
- TryCast
Error - The error type of fallible reference conversions.
- TryRead
Error - The error type of fallible read-conversions.