pub struct ScalaEnumCase {
pub name: String,
pub fields: Vec<ScalaParam>,
}Expand description
A Scala 3 enum declaration.
Example:
enum Color:
case Red, Green, BlueAlso supports parameterized cases:
enum Expr:
case Lit(n: Int)
case Add(l: Expr, r: Expr)Fields§
§name: StringCase name: Red, Lit
fields: Vec<ScalaParam>Fields (empty for simple cases)
Trait Implementations§
Source§impl Clone for ScalaEnumCase
impl Clone for ScalaEnumCase
Source§fn clone(&self) -> ScalaEnumCase
fn clone(&self) -> ScalaEnumCase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScalaEnumCase
impl Debug for ScalaEnumCase
Source§impl PartialEq for ScalaEnumCase
impl PartialEq for ScalaEnumCase
impl StructuralPartialEq for ScalaEnumCase
Auto Trait Implementations§
impl Freeze for ScalaEnumCase
impl RefUnwindSafe for ScalaEnumCase
impl Send for ScalaEnumCase
impl Sync for ScalaEnumCase
impl Unpin for ScalaEnumCase
impl UnsafeUnpin for ScalaEnumCase
impl UnwindSafe for ScalaEnumCase
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