[][src]Struct mozpdb::Type

pub struct Type<'t>(_, _);

Represents a type from the type table. A Type has been minimally processed and may not be correctly formed or even understood by this library.

To avoid copying, Types exist as references to data owned by the parent TypeInformation. Therefore, a Type may not outlive its parent.

Methods

impl<'t> Type<'t>[src]

pub fn type_index(&self) -> TypeIndex[src]

Returns this type's TypeIndex.

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

Returns the length of this type's data in terms of bytes in the on-disk format.

Types are prefixed by length, which is not included in this count.

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

Returns the kind of type identified by this Type.

As a special case, if this Type is actually a primitive type, raw_kind() will return 0xffff.

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

Parse this Type into a TypeData.

Errors

  • Error::UnimplementedTypeKind(kind) if the type record isn't currently understood by this library
  • Error::UnexpectedEof if the type record is malformed

Trait Implementations

impl<'t> Clone for Type<'t>[src]

impl<'t> Copy for Type<'t>[src]

impl<'t> PartialEq<Type<'t>> for Type<'t>[src]

impl<'t> Debug for Type<'t>[src]

Auto Trait Implementations

impl<'t> Send for Type<'t>

impl<'t> Sync for Type<'t>

impl<'t> Unpin for Type<'t>

impl<'t> UnwindSafe for Type<'t>

impl<'t> RefUnwindSafe for Type<'t>

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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