Enum yatlv::Error[][src]

pub enum Error {
    IncompleteFrameFormat,
    InvalidFrameFormat(u32),
    IncompleteFrameFieldCount,
    IncompleteFieldTagOrLength,
    IncompleteFieldValue(usizeusize),
    IncompatibleFieldLength(usize),
    IncompatibleFieldValue,
    UnexpectedData,
}
Expand description

Library Error Type

Variants

IncompleteFrameFormat

The frame must start with a single format byte.

InvalidFrameFormat(u32)

The frame format must be one of the recognized formats (currently only, 0x01).

IncompleteFrameFieldCount

The frame must have a four byte field-count that indicates the number fields in the frame (encoded as big-endian u32)

IncompleteFieldTagOrLength

Each field must start with a two byte tag (big-endian u16) and a four byte length (big-endian u32).

IncompleteFieldValue(usizeusize)

Each field must have a value that is field-length long This error as expected and actual lengths.

IncompatibleFieldLength(usize)

When converting a field to an expected type of value the field length must be compatible with the expected value type.

IncompatibleFieldValue

When converting a field into an expected type the value of the field must be compatible with the expected type.

UnexpectedData

Once all the fields have been read there should be no more data in the frame.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

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.