pub struct TypedClassField {
pub name: Ident,
pub ty: Type,
pub visibility: Visibility,
pub readonly: bool,
pub optional: bool,
pub initializer: Option<ExprId>,
pub auto_assigned: bool,
pub narrowing_check: Option<Box<FieldNarrowingCheck>>,
pub doc: Option<DocComment>,
}Fields§
§name: Ident§ty: Type§visibility: Visibility§readonly: bool§optional: bool§initializer: Option<ExprId>§auto_assigned: booltrue for a parameter property (constructor(public x: T)): the field is
assigned from the constructor parameter, so it’s exempt from the
definite-assignment check.
narrowing_check: Option<Box<FieldNarrowingCheck>>Set when this declaration narrows an inherited one. See
FieldNarrowingCheck. Boxed because every class field carries this and
almost none of them narrow.
doc: Option<DocComment>Trait Implementations§
Source§impl Clone for TypedClassField
impl Clone for TypedClassField
Source§impl Debug for TypedClassField
impl Debug for TypedClassField
Source§impl PartialEq for TypedClassField
impl PartialEq for TypedClassField
impl StructuralPartialEq for TypedClassField
Auto Trait Implementations§
impl Freeze for TypedClassField
impl RefUnwindSafe for TypedClassField
impl Send for TypedClassField
impl Sync for TypedClassField
impl Unpin for TypedClassField
impl UnsafeUnpin for TypedClassField
impl UnwindSafe for TypedClassField
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