Expand description
The BinRead
trait reads data from streams and converts it into objects.
This trait is usually derived, but can also be manually implemented by
writing an appropriate Args
type and read_options()
function.
This trait can be used with #[derive]
or #[derive_binread]
. Each field
of a derived type must either implement BinRead
or be annotated with an
attribute containing a map
, try_map
, or parse_with
directive.
Using #[derive_binread]
instead of #[derive]
is required when using
temporary fields.
The type used for the args
parameter of read_args()
and
read_options()
.
When the given type implements Default
, convenience functions like
read()
are enabled. BinRead
implementations that don’t receive any
arguments should use the ()
type.
When BinRead
is derived, the import
and import_tuple
directives define this type.
Read Self
from the reader using the given ReadOptions
and
arguments.
Read Self
from the reader using default arguments.
Read Self
from the reader using the given arguments.
Runs any post-processing steps required to finalize construction of the
object.
impl<b1: BinRead<Args = ()>, b2: BinRead<Args = ()>, b3: BinRead<Args = ()>, b4: BinRead<Args = ()>, b5: BinRead<Args = ()>, b6: BinRead<Args = ()>, b7: BinRead<Args = ()>, b8: BinRead<Args = ()>, b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b2: BinRead<Args = ()>, b3: BinRead<Args = ()>, b4: BinRead<Args = ()>, b5: BinRead<Args = ()>, b6: BinRead<Args = ()>, b7: BinRead<Args = ()>, b8: BinRead<Args = ()>, b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b3: BinRead<Args = ()>, b4: BinRead<Args = ()>, b5: BinRead<Args = ()>, b6: BinRead<Args = ()>, b7: BinRead<Args = ()>, b8: BinRead<Args = ()>, b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b4: BinRead<Args = ()>, b5: BinRead<Args = ()>, b6: BinRead<Args = ()>, b7: BinRead<Args = ()>, b8: BinRead<Args = ()>, b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b5: BinRead<Args = ()>, b6: BinRead<Args = ()>, b7: BinRead<Args = ()>, b8: BinRead<Args = ()>, b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b6: BinRead<Args = ()>, b7: BinRead<Args = ()>, b8: BinRead<Args = ()>, b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b7: BinRead<Args = ()>, b8: BinRead<Args = ()>, b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b8: BinRead<Args = ()>, b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b9: BinRead<Args = ()>, b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b10: BinRead<Args = ()>, b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b11: BinRead<Args = ()>, b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b12: BinRead<Args = ()>, b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b13: BinRead<Args = ()>, b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b14: BinRead<Args = ()>, b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b15: BinRead<Args = ()>, b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b16: BinRead<Args = ()>, b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b17: BinRead<Args = ()>, b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b18: BinRead<Args = ()>, b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b19: BinRead<Args = ()>, b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b20: BinRead<Args = ()>, b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b21: BinRead<Args = ()>, b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b22: BinRead<Args = ()>, b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b23: BinRead<Args = ()>, b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b23, b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b24: BinRead<Args = ()>, b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b24, b25, b26, b27, b28, b29, b30, b31, b32)
impl<b25: BinRead<Args = ()>, b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b25, b26, b27, b28, b29, b30, b31, b32)
impl<b26: BinRead<Args = ()>, b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b26, b27, b28, b29, b30, b31, b32)
impl<b27: BinRead<Args = ()>, b28: BinRead<Args = ()>, b29: BinRead<Args = ()>, b30: BinRead<Args = ()>, b31: BinRead<Args = ()>, b32: BinRead<Args = ()>> BinRead for (b27, b28, b29, b30, b31, b32)