[−]Struct symbolic::debuginfo::pdb::pdb::Item
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, Items
s 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:
Type::parse
returnsTypeData
.Id::parse
returnsIdData
.
Implementations
impl<'t, I> Item<'t, I> where
I: ItemIndex,
I: ItemIndex,
pub fn index(&self) -> I
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 libraryError::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 libraryError::UnexpectedEof
if the id record is malformed
Trait Implementations
impl<'t, I> Clone for Item<'t, I> where
I: Clone,
I: Clone,
pub fn clone(&self) -> Item<'t, I>
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'t, I> Copy for Item<'t, I> where
I: Copy,
I: Copy,
impl<'t, I> Debug for Item<'t, I> where
I: ItemIndex,
I: ItemIndex,
impl<'t, I> PartialEq<Item<'t, I>> for Item<'t, I> where
I: PartialEq<I>,
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]
I: RefUnwindSafe,
impl<'t, I> Send for Item<'t, I> where
I: Send,
[src]
I: Send,
impl<'t, I> Sync for Item<'t, I> where
I: Sync,
[src]
I: Sync,
impl<'t, I> Unpin for Item<'t, I> where
I: Unpin,
[src]
I: Unpin,
impl<'t, I> UnwindSafe for Item<'t, I> where
I: UnwindSafe,
[src]
I: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,