pub struct FieldInfo {
pub name: Option<String>,
pub index: usize,
pub ty: String,
pub resolved_ty: Option<String>,
pub visibility: Visibility,
pub docs: Option<String>,
pub attributes: Vec<String>,
pub offset: Option<usize>,
pub size: Option<usize>,
pub span: Option<SpanInfo>,
}Expand description
Information about a struct field.
Fieldsยง
ยงname: Option<String>Field name (None for tuple struct fields)
index: usizeField index
ty: StringType as a string
resolved_ty: Option<String>Resolved/canonical type
visibility: VisibilityVisibility of the field
docs: Option<String>Doc comments
attributes: Vec<String>Attributes
offset: Option<usize>Offset in bytes (if layout is known)
size: Option<usize>Size in bytes (if layout is known)
span: Option<SpanInfo>Trait Implementationsยง
Sourceยงimpl<'de> Deserialize<'de> for FieldInfo
impl<'de> Deserialize<'de> for FieldInfo
Sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementationsยง
impl Freeze for FieldInfo
impl RefUnwindSafe for FieldInfo
impl Send for FieldInfo
impl Sync for FieldInfo
impl Unpin for FieldInfo
impl UnwindSafe for FieldInfo
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