[−][src]Struct ddbug_parser::VariantPart
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]
&self,
members: &'a [Member<'input>]
) -> Option<&'a Member<'input>>
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]
pub fn clone(&self) -> VariantPart<'input>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'input> Debug for VariantPart<'input>
[src]
impl<'input> Default for VariantPart<'input>
[src]
pub fn default() -> 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,