Derive Macro Read

Source
#[derive(Read)]
{
    // Attributes available to this derive:
    #[read]
}
Expand description

#[derive(Read)]

Derives std::io::Read for the given struct.

Supported attributes:

  • #[read]: Marks the field as a read stream.
  • #[read(as_ref)]: Delegates the field to the inner type using AsRef/AsMut.
  • #[read(deref)]: Delegates the field to the inner type using Deref/DerefMut.
  • #[read(<function>=<override>)]: Overrides the default <function> method with the given override function.