#[repr(u8)]pub enum CtorShape {
None = 0,
Record = 1,
Tuple = 2,
Unit = 3,
}Expand description
Syntactic/constructor shape of a Struct, Union, or Enum Variant.
Variants§
None = 0
Not a value/record constructor (TyAlias, Const, Static, AssocConst, Enum).
Record = 1
Braced record (struct Point { x: i32 }, Enum::Struct { a: u8 }, union Raw { ... }).
Tuple = 2
Tuple constructor (struct Token(u64);, Option::Some(T)); also indexed in fn_sigs.
Unit = 3
Unit constructor (struct Marker;, Option::None).
Implementations§
Trait Implementations§
impl Copy for CtorShape
impl Eq for CtorShape
Source§impl Ord for CtorShape
impl Ord for CtorShape
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 CtorShape
impl PartialOrd for CtorShape
impl StructuralPartialEq for CtorShape
Auto Trait Implementations§
impl Forget for CtorShape
impl Freeze for CtorShape
impl Move for CtorShape
impl RefUnwindSafe for CtorShape
impl Send for CtorShape
impl Sync for CtorShape
impl Unpin for CtorShape
impl UnsafeUnpin for CtorShape
impl UnwindSafe for CtorShape
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