pub struct AggId(/* private fields */);Expand description
An aggregate (struct or array) memory type in a module. It prints as t<n>.
§Examples
use ir_lang::AggId;
let h = AggId::from_u32(3);
assert_eq!(h.index(), 3);
assert_eq!(h.to_string(), "t3");Implementations§
Source§impl AggId
impl AggId
Sourcepub const fn from_u32(index: u32) -> Self
pub const fn from_u32(index: u32) -> Self
Makes a handle from a raw index.
Handles normally come from the module or function that owns the entity. This constructor exists for side tables and tests; a handle made up this way is checked like any other (an out-of-range handle is a validation error, never a panic).
§Examples
use ir_lang::AggId;
assert_eq!(AggId::from_u32(0).index(), 0);Trait Implementations§
impl Copy for AggId
impl Eq for AggId
Source§impl Ord for AggId
impl Ord for AggId
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 AggId
impl PartialOrd for AggId
impl StructuralPartialEq for AggId
Auto Trait Implementations§
impl Freeze for AggId
impl RefUnwindSafe for AggId
impl Send for AggId
impl Sync for AggId
impl Unpin for AggId
impl UnsafeUnpin for AggId
impl UnwindSafe for AggId
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