pub enum Shape {
Named,
Tuple,
Unit,
Newtype,
}
Expand description
Description of how fields in a struct or variant are syntactically laid out.
Variants
Named
A set of named fields, e.g. { field: String }
.
Tuple
A list of unnamed fields, e.g. (String, u64)
.
Unit
No fields, e.g. struct Example;
Newtype
A special case of Tuple
with exactly one field, e.g. (String)
.
Implementations
sourceimpl Shape
impl Shape
pub fn description(&self) -> &'static str
Trait Implementations
sourceimpl FromIterator<Shape> for ShapeSet
impl FromIterator<Shape> for ShapeSet
impl Copy for Shape
impl Eq for Shape
impl StructuralEq for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more