#[non_exhaustive]pub enum MemType {
Scalar(Type),
Agg(AggId),
}Expand description
A type as laid out in memory: a scalar value type or an aggregate.
§Examples
use ir_lang::{AggId, MemType, Type};
let m: MemType = Type::I32.into();
assert_eq!(m, MemType::Scalar(Type::I32));
assert_eq!(MemType::from(AggId::from_u32(0)).to_string(), "t0");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
impl Copy for MemType
impl Eq for MemType
Source§impl Ord for MemType
impl Ord for MemType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for MemType
impl PartialOrd for MemType
impl StructuralPartialEq for MemType
Auto Trait Implementations§
impl Freeze for MemType
impl RefUnwindSafe for MemType
impl Send for MemType
impl Sync for MemType
impl Unpin for MemType
impl UnsafeUnpin for MemType
impl UnwindSafe for MemType
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