Enum erg_parser::ast::Signature
source · pub enum Signature {
Var(VarSignature),
Subr(SubrSignature),
}
Expand description
represents a declaration of a variable
Variants§
Var(VarSignature)
Subr(SubrSignature)
Implementations§
source§impl Signature
impl Signature
pub fn name_as_str(&self) -> Option<&Str>
pub fn new_var(ident: Identifier) -> Self
pub fn new_subr(ident: Identifier, params: Params) -> Self
pub fn ident(&self) -> Option<&Identifier>
pub fn ident_mut(&mut self) -> Option<&mut Identifier>
pub fn params(self) -> Option<Params>
pub fn decorators(&self) -> Option<&HashSet<Decorator>>
pub fn t_spec(&self) -> Option<&TypeSpec>
pub fn t_spec_op_mut(&mut self) -> Option<&mut TypeSpecWithOp>
pub fn is_const(&self) -> bool
pub const fn is_subr(&self) -> bool
pub const fn is_var(&self) -> bool
pub fn vis(&self) -> &VisModifierSpec
Trait Implementations§
source§impl Locational for Signature
impl Locational for Signature
source§impl NestedDisplay for Signature
impl NestedDisplay for Signature
source§impl PartialEq for Signature
impl PartialEq for Signature
impl Eq for Signature
impl StructuralEq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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