Struct pdb::StreamIndex[][src]

pub struct StreamIndex(pub u16);

Index of a PDB stream.

This index can either refer to a stream, or indicate the absence of a stream. Check is_none to see whether a stream should exist.

Use get to load data for this stream.

Implementations

impl StreamIndex[src]

pub const fn none() -> Self[src]

Returns an index that points to no value.

#[must_use]pub fn is_some(self) -> bool[src]

Returns true if the index points to a valid value.

#[must_use]pub fn is_none(self) -> bool[src]

Returns true if the index indicates the absence of a value.

impl StreamIndex[src]

pub fn get<'s, S>(self, pdb: &mut PDB<'s, S>) -> Result<Option<Stream<'s>>> where
    S: Source<'s> + 's, 
[src]

Load the raw data of this stream from the PDB.

Returns None if this index is none. Otherwise, this will try to read the stream from the PDB, which might fail if the stream is missing.

Errors

  • Error::StreamNotFound if the PDB does not contain this stream
  • Error::IoError if returned by the Source
  • Error::PageReferenceOutOfRange if the PDB file seems corrupt

Trait Implementations

impl Clone for StreamIndex[src]

impl Copy for StreamIndex[src]

impl Debug for StreamIndex[src]

impl Default for StreamIndex[src]

impl Display for StreamIndex[src]

impl Eq for StreamIndex[src]

impl Hash for StreamIndex[src]

impl Ord for StreamIndex[src]

impl PartialEq<StreamIndex> for StreamIndex[src]

impl PartialOrd<StreamIndex> for StreamIndex[src]

impl StructuralEq for StreamIndex[src]

impl StructuralPartialEq for StreamIndex[src]

impl<'a> TryFromCtx<'a, Endian, [u8]> for StreamIndex[src]

type Error = Error

Auto Trait Implementations

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> ToString for T where
    T: Display + ?Sized
[src]

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.