[][src]Struct ddbug_parser::VariantPart

pub struct VariantPart<'input> { /* fields omitted */ }

A variant part.

A variant part is a discriminant member and list of variants that are selected based on the value of the discriminant member.

Implementations

impl<'input> VariantPart<'input>[src]

pub fn discriminant<'a>(
    &self,
    members: &'a [Member<'input>]
) -> Option<&'a Member<'input>>
[src]

The discriminant member for this variant part.

The given members should be from the type containing this variant part.

pub fn variants(&self) -> &[Variant<'input>][src]

The variants for this variant part.

pub fn bit_offset(&self) -> u64[src]

The smallest offset in bits for a variant of this variant part.

pub fn bit_size(&self, hash: &FileHash<'_>) -> Option<u64>[src]

The largest size in bits for the variants of this variant part, excluding leading and trailing padding.

Trait Implementations

impl<'input> Clone for VariantPart<'input>[src]

impl<'input> Debug for VariantPart<'input>[src]

impl<'input> Default for VariantPart<'input>[src]

Auto Trait Implementations

impl<'input> RefUnwindSafe for VariantPart<'input>[src]

impl<'input> Send for VariantPart<'input>[src]

impl<'input> Sync for VariantPart<'input>[src]

impl<'input> Unpin for VariantPart<'input>[src]

impl<'input> UnwindSafe for VariantPart<'input>[src]

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, 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.