[]Struct symbolic::debuginfo::pdb::pdb::Item

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

pub fn index(&self) -> I

Returns this item's index.

Depending on the stream, either a TypeIndex or IdIndex.

pub fn len(&self) -> usize

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

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

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>

pub fn parse(&self) -> Result<TypeData<'t>, Error>

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>

pub fn parse(&self) -> Result<IdData<'t>, Error>

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 for Item<'t, I> where
    I: Clone

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

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

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

impl<'t, I> StructuralPartialEq for Item<'t, I>

Auto Trait Implementations

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

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

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

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

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

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.