Struct pdb::Item[][src]

pub struct Item<'t, I> { /* fields omitted */ }

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

impl<'t, I> Item<'t, I> where
    I: ItemIndex
[src]

pub fn index(&self) -> I[src]

Returns this item’s index.

Depending on the stream, either a TypeIndex or IdIndex.

pub fn len(&self) -> usize[src]

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.

pub fn is_empty(&self) -> bool[src]

Returns whether this items’s data is empty.

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

pub fn raw_kind(&self) -> u16[src]

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.

impl<'t> Item<'t, TypeIndex>[src]

pub fn parse(&self) -> Result<TypeData<'t>>[src]

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

impl<'t> Item<'t, IdIndex>[src]

pub fn parse(&self) -> Result<IdData<'t>>[src]

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

impl<'t, I: Clone> Clone for Item<'t, I>[src]

impl<'t, I: Copy> Copy for Item<'t, I>[src]

impl<'t, I> Debug for Item<'t, I> where
    I: ItemIndex
[src]

impl<'t, I: PartialEq> PartialEq<Item<'t, I>> for Item<'t, I>[src]

impl<'t, I> StructuralPartialEq for Item<'t, I>[src]

Auto Trait Implementations

impl<'t, I> RefUnwindSafe for Item<'t, I> where
    I: RefUnwindSafe

impl<'t, I> Send for Item<'t, I> where
    I: Send

impl<'t, I> Sync for Item<'t, I> where
    I: Sync

impl<'t, I> Unpin for Item<'t, I> where
    I: Unpin

impl<'t, I> UnwindSafe for Item<'t, I> where
    I: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.