pub enum StructElement<'a> {
Shape(&'a ShapeElement),
Tuple(&'a TupleElement),
}Variants§
Shape(&'a ShapeElement)
Tuple(&'a TupleElement)
Implementations§
source§impl<'a> StructElement<'a>
impl<'a> StructElement<'a>
pub fn from_shape(elements: &'a [ShapeElement]) -> Vec<StructElement<'a>>
pub fn from_named_tuple(elements: &'a [TupleElement]) -> Vec<StructElement<'a>>
pub fn name(&self) -> String
pub fn type_pos(&self) -> TypePos
pub fn wrap(&self, token: &Option<TokenStream>) -> TokenStream
pub fn cardinality(&self) -> Cardinality
Trait Implementations§
source§impl<'a> From<&'a ShapeElement> for StructElement<'a>
impl<'a> From<&'a ShapeElement> for StructElement<'a>
source§fn from(value: &'a ShapeElement) -> Self
fn from(value: &'a ShapeElement) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a TupleElement> for StructElement<'a>
impl<'a> From<&'a TupleElement> for StructElement<'a>
source§fn from(value: &'a TupleElement) -> Self
fn from(value: &'a TupleElement) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for StructElement<'a>
impl<'a> RefUnwindSafe for StructElement<'a>
impl<'a> Send for StructElement<'a>
impl<'a> Sync for StructElement<'a>
impl<'a> Unpin for StructElement<'a>
impl<'a> UnwindSafe for StructElement<'a>
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