[−][src]Struct mozpdb::Type
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, Type
s 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 libraryError::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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,