pub trait DataExt {
// Required methods
fn is_struct(&self) -> bool;
fn is_enum(&self) -> bool;
fn is_union(&self) -> bool;
fn as_struct(&self) -> Option<&DataStruct>;
fn as_enum(&self) -> Option<&DataEnum>;
fn as_union(&self) -> Option<&DataUnion>;
fn span(&self) -> Span;
}Expand description
Required Methods§
Sourcefn as_struct(&self) -> Option<&DataStruct>
fn as_struct(&self) -> Option<&DataStruct>
Returns the inner syn::DataStruct if this is a struct.