pub struct EnumCase { /* private fields */ }Expand description
An enum case.
Implementations§
Source§impl EnumCase
Fields
impl EnumCase
Fields
Sourcepub fn fields(&self) -> &EnumFields
pub fn fields(&self) -> &EnumFields
Gets the fields.
Sourcepub fn set_fields<F>(&mut self, fields: F)where
F: Into<EnumFields>,
pub fn set_fields<F>(&mut self, fields: F)where
F: Into<EnumFields>,
Sets the fields.
Sourcepub fn with_fields<F>(self, fields: F) -> Selfwhere
F: Into<EnumFields>,
pub fn with_fields<F>(self, fields: F) -> Selfwhere
F: Into<EnumFields>,
Sets the fields.
Trait Implementations§
Source§impl Statement for EnumCase
impl Statement for EnumCase
Source§fn write(&self, b: &mut CodeBuffer, level: usize)
fn write(&self, b: &mut CodeBuffer, level: usize)
Writes the code to the buffer
b at the indent level.Source§impl WithComments for EnumCase
impl WithComments for EnumCase
Source§fn add_comment<S>(&mut self, comment: S)
fn add_comment<S>(&mut self, comment: S)
Adds the
comment line.Source§fn with_comment<S>(self, comment: S) -> Self
fn with_comment<S>(self, comment: S) -> Self
Adds the
comment line.Source§fn write_comments(
&self,
comment_type: CommentType,
b: &mut CodeBuffer,
level: usize,
)
fn write_comments( &self, comment_type: CommentType, b: &mut CodeBuffer, level: usize, )
Writes the comment lines.
Auto Trait Implementations§
impl Freeze for EnumCase
impl RefUnwindSafe for EnumCase
impl Send for EnumCase
impl Sync for EnumCase
impl Unpin for EnumCase
impl UnwindSafe for EnumCase
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