#[repr(packed)]
pub struct CacheResponse { /* private fields */ }
Expand description

The cache response starts a sequence of payload PDUs with data.

Implementations

The payload type of a cache response.

Creates a new cache response for the given state.

Writes a value to a writer.

Returns the value of the version field of the header.

Returns the value of the session field of the header.

Note that this field is used for other purposes in some PDU types.

Returns the PDU size.

The size is returned as a u32 since that type is used in the header.

Reads a value from a reader.

If a value with a different PDU type is received, returns an error.

Tries to read a value from a reader.

If a different PDU type is received, returns the header as the error case of the ok case.

Reads only the payload part of a value from a reader.

Assuming that the header was already read and is passed via header, the function reads the rest of the PUD from the reader and returns the complete value.

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.

Returns the “default value” for a type. Read more

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.