pub enum ScalaDecl {
Show 13 variants
CaseClass(ScalaCaseClass),
Trait(ScalaTrait),
Enum(ScalaEnum),
Object(ScalaObject),
Class(ScalaClass),
Method(ScalaMethod),
Val(String, ScalaType, ScalaExpr),
TypeAlias(String, Vec<String>, ScalaType),
OpaqueType(String, Vec<String>, ScalaType),
Extension(ScalaType, Vec<ScalaMethod>),
Given(String, ScalaType, Vec<ScalaMethod>),
Comment(String),
RawLine(String),
}Expand description
The various top-level declarations in a Scala compilation unit.
Variants§
CaseClass(ScalaCaseClass)
Trait(ScalaTrait)
Enum(ScalaEnum)
Object(ScalaObject)
Class(ScalaClass)
Method(ScalaMethod)
Val(String, ScalaType, ScalaExpr)
val name: Type = expr at top level
TypeAlias(String, Vec<String>, ScalaType)
type Name = Type (alias)
OpaqueType(String, Vec<String>, ScalaType)
opaque type Name = Type
Extension(ScalaType, Vec<ScalaMethod>)
extension (x: Type) def method...
Given(String, ScalaType, Vec<ScalaMethod>)
given name: Type with { ... }
Comment(String)
RawLine(String)
Trait Implementations§
impl StructuralPartialEq for ScalaDecl
Auto Trait Implementations§
impl Freeze for ScalaDecl
impl RefUnwindSafe for ScalaDecl
impl Send for ScalaDecl
impl Sync for ScalaDecl
impl Unpin for ScalaDecl
impl UnsafeUnpin for ScalaDecl
impl UnwindSafe for ScalaDecl
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