Struct pdb::Item

source · []
pub struct Item<'t, I> { /* private fields */ }
Expand description

Represents an entry in the type or id stream.

An Item has been minimally processed and may not be correctly formed or even understood by this library. To avoid copying, Itemss exist as references to data owned by the parent ItemInformation. Therefore, an Item may not outlive its parent.

The data held by items can be parsed:

Depending on the stream, this can either be a Type or Id.

Implementations

Returns this item’s index.

Depending on the stream, either a TypeIndex or IdIndex.

Returns the the binary data length in the on-disk format.

Items are prefixed by a 16-bit length number, which is not included in this length.

Returns whether this items’s data is empty.

Items are prefixed by a 16-bit length number, which is not included in this operation.

Returns the identifier of the kind of data stored by this this Item.

As a special case, if this is a primitive Type, this function will return 0xffff.

Parse this Type into TypeData.

Errors
  • Error::UnimplementedTypeKind(kind) if the type record isn’t currently understood by this library
  • Error::UnexpectedEof if the type record is malformed

Parse this Id into IdData.

Errors
  • Error::UnimplementedTypeKind(kind) if the id record isn’t currently understood by this library
  • Error::UnexpectedEof if the id record is malformed

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.