pub enum Init {
Expr(ExprId),
List(InitItemList),
}Expand description
What an object is initialized with.
Variants§
Expr(ExprId)
A single expression, as in int x = 1;.
List(InitItemList)
A braced list, which may be empty. {} is C23 and { 0 } is how everybody used to
write it, and they are not the same spelling even though they mean the same thing.
Trait Implementations§
impl Copy for Init
impl Eq for Init
impl StructuralPartialEq for Init
Auto Trait Implementations§
impl Freeze for Init
impl RefUnwindSafe for Init
impl Send for Init
impl Sync for Init
impl Unpin for Init
impl UnsafeUnpin for Init
impl UnwindSafe for Init
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