[]Struct symbolic::debuginfo::pdb::pdb::StreamIndex

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 StreamIndex::get to load data for this stream.

Implementations

impl StreamIndex

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

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

impl StreamIndex

pub const fn none() -> StreamIndex

Returns an index that points to no value.

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

Returns true if the index points to a valid value.

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

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

Trait Implementations

impl Clone for StreamIndex

impl Copy for StreamIndex

impl Debug for StreamIndex

impl Default for StreamIndex

impl Display for StreamIndex

impl Eq for StreamIndex

impl Hash for StreamIndex

impl Ord for StreamIndex

impl PartialEq<StreamIndex> for StreamIndex

impl PartialOrd<StreamIndex> for StreamIndex

impl StructuralEq for StreamIndex

impl StructuralPartialEq for StreamIndex

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

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> RuleType for T where
    T: Eq + Ord + Copy + Debug + Hash
[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.