[−][src]Struct macro_input::FieldDefs
FieldDefs is a collection of FieldDefs
Example
use macro_input::{DefaultValue, FieldDef, FieldDefs}; const BAR_FIELD: FieldDef = FieldDef::new("foo", "bar", false, DefaultValue::Bool(None)); const BAZ_FIELD: FieldDef = FieldDef::new("foo", "baz", false, DefaultValue::Str(None)); const FOO_FIELDS: &[&FieldDef] = &[&BAR_FIELD, &BAZ_FIELD]; const FOO_FIELD_DEFS: FieldDefs = FieldDefs::new(FOO_FIELDS);
Implementations
impl<'a> FieldDefs<'a>[src]
pub const fn new(defs: &'a [&'a FieldDef<'a>]) -> FieldDefs<'a>[src]
create a new collection of FieldDefs from a slice
pub const fn empty() -> &'static FieldDefs<'static>[src]
return an empty collection of FieldDefs
pub fn strip(&self, attrs: &mut Vec<Attribute, Global>)[src]
strip the attributes for all field away
Trait Implementations
impl<'a> From<&'a [&'a FieldDef<'a>]> for FieldDefs<'a>[src]
impl<'_> Lint<Vec<Attribute, Global>> for FieldDefs<'_>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for FieldDefs<'a>[src]
impl<'a> !Send for FieldDefs<'a>[src]
impl<'a> !Sync for FieldDefs<'a>[src]
impl<'a> Unpin for FieldDefs<'a>[src]
impl<'a> UnwindSafe for FieldDefs<'a>[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,