pub enum TypedClassAccessor {
Getter {
name: Ident,
ret_ty: Type,
visibility: Visibility,
body: StmtId,
},
Setter {
name: Ident,
param: TypedParam,
visibility: Visibility,
body: StmtId,
},
}Expand description
One accessor function. Getter and setter are independent: the read type
(ret_ty) and write type (param.ty) need not match (TS 4.3+).
Variants§
Getter
Setter
Fields
§
param: TypedParamThe setter parameter; param.ty is the property’s write type.
§
visibility: VisibilityImplementations§
Source§impl TypedClassAccessor
impl TypedClassAccessor
pub fn name(&self) -> &Ident
pub fn body(&self) -> StmtId
pub fn visibility(&self) -> Visibility
Trait Implementations§
Source§impl Clone for TypedClassAccessor
impl Clone for TypedClassAccessor
Source§impl Debug for TypedClassAccessor
impl Debug for TypedClassAccessor
Source§impl PartialEq for TypedClassAccessor
impl PartialEq for TypedClassAccessor
impl StructuralPartialEq for TypedClassAccessor
Auto Trait Implementations§
impl Freeze for TypedClassAccessor
impl RefUnwindSafe for TypedClassAccessor
impl Send for TypedClassAccessor
impl Sync for TypedClassAccessor
impl Unpin for TypedClassAccessor
impl UnsafeUnpin for TypedClassAccessor
impl UnwindSafe for TypedClassAccessor
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