pub enum EndOfData {
    V0(EndOfDataV0),
    V1(EndOfDataV1),
}
Expand description

End-of-data marks the end of sequence of payload PDUs.

This PDU differs between version 0 and 1 of RTR. Consequently, this generic version is an enum that can be both, depending on the version requested.

Variants

V0(EndOfDataV0)

V1(EndOfDataV1)

Implementations

The PDU type of the end-of-data PDU.

Creates a new end-of-data PDU from the data given.

If version is 0, the V0 variant is created and the three timer values are ignored. Otherwise, a V1 variant is created with the given version.

Reads the end-of-data payload from a reader.

Which version of the end-of-data PDU is expected depends on the version field of the header. On success, the return value contains a full PDU, filling in missing data from header.

Returns the version field of the PDU.

Returns the session ID.

Returns the serial number.

Returns the state by combing session ID and serial number.

Returns the three timing values if they are available.

The values are only available in the V1 variant.

Writes the PDU to a writer.

Trait Implementations

Converts this type into a mutable reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.