#[derive(FromBytes)]
{
// Attributes available to this derive:
#[neli]
}
Expand description
Derives the neli FromBytes trait for a struct.
Acceptable struct attribute is:
#[neli(from_bytes_bound = "T: MyTrait")]which will generate a trait bound in the impl for the specified type parameter.#[neli(padding)]which will add special handling for padding for this struct.
Acceptable field attribute forms are:
#[neli(input = "input_expression")]which may only be used once for a struct. The behavior of this attribute is that a bound requirement will change from the implicitFromBytesto an implicitFromBytesWithInputbound. The method in this trait will be called withinput_expressionas the input provided.#[neli(input)]which will transparently pass the input provided in theFromBytesWithInputmethod through to theFromBytesWithInputmethod for this field unchanged according to the rules described above.#[neli(size = "size_var_name")]which allows specifying a size of the data type that is different from the input specified by#[neli(input)]. Not specifying this attribute defaults to usinginputas the size as well.
Implicit type parameter bound: FromBytes.