Struct virtue::parse::UnnamedField
source · pub struct UnnamedField {
pub vis: Visibility,
pub type: Vec<TokenTree>,
pub attributes: Vec<Attribute>,
}
Expand description
An unnamed field
Fields§
§vis: Visibility
The visibility of the field
type: Vec<TokenTree>
The type of the field
attributes: Vec<Attribute>
The attributes of the field
Implementations§
source§impl UnnamedField
impl UnnamedField
sourcepub fn type_string(&self) -> String
pub fn type_string(&self) -> String
Return type
as a string. Useful for comparing it for known values.
sourcepub fn span(&self) -> Span
pub fn span(&self) -> Span
Return the span of type
.
note: Until https://github.com/rust-lang/rust/issues/54725 is stable, this will return the first span of the type instead
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnnamedField
impl RefUnwindSafe for UnnamedField
impl !Send for UnnamedField
impl !Sync for UnnamedField
impl Unpin for UnnamedField
impl UnwindSafe for UnnamedField
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