pub struct VariantInfo {
pub name: String,
pub payload_type: HirType,
}Expand description
Information about a variant in a tagged union.
Each variant corresponds to a field in the C union, representing one possible type that the tagged union can hold.
Fields§
§name: StringName of the variant (union field name).
Example: "int_val" for union { int int_val; float float_val; }
payload_type: HirTypeType of the variant payload.
Example: HirType::Int for the int int_val field
Trait Implementations§
Source§impl Clone for VariantInfo
impl Clone for VariantInfo
Source§fn clone(&self) -> VariantInfo
fn clone(&self) -> VariantInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VariantInfo
impl Debug for VariantInfo
Source§impl PartialEq for VariantInfo
impl PartialEq for VariantInfo
impl Eq for VariantInfo
impl StructuralPartialEq for VariantInfo
Auto Trait Implementations§
impl Freeze for VariantInfo
impl RefUnwindSafe for VariantInfo
impl Send for VariantInfo
impl Sync for VariantInfo
impl Unpin for VariantInfo
impl UnwindSafe for VariantInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more